12345678910111213141516171819202122 |
- 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)
- }
|