Debian Codegraph @

v3/rate_limiter.go

raw symbols SCIP
1 package grab
2
3 import "context"
4
5 // RateLimiter is an interface that must be satisfied by any third-party rate
6 // limiters that may be used to limit download transfer speeds.
7 //
8 // A recommended token bucket implementation can be found at
9 // https://godoc.org/golang.org/x/time/rate#Limiter.
10 type RateLimiter interface {
11 WaitN(ctx context.Context, n int) (err error)
12 }