| 3 | import "context" |
| 4 | |
| 5 | type TokenBucket interface { |
| 6 | Take() <-chan struct{} |
| 7 | Put() |
| 8 | Do(context.Context, func() error) error |
| 9 | } |
| 10 | |
| 11 | // StaticTokenBucket is a bucket with a fixed number of tokens, |
| 12 | // where the retrieval and return of tokens are manually controlled. |
no outgoing calls
no test coverage detected