You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
315 B
22 lines
315 B
package rate |
|
|
|
import ( |
|
"context" |
|
) |
|
|
|
// Op operations type. |
|
type Op int |
|
|
|
const ( |
|
// Success opertion type: success |
|
Success Op = iota |
|
// Ignore opertion type: ignore |
|
Ignore |
|
// Drop opertion type: drop |
|
Drop |
|
) |
|
|
|
// Limiter limit interface. |
|
type Limiter interface { |
|
Allow(ctx context.Context) (func(Op), error) |
|
}
|
|
|