add Set for traffic Limiter

This commit is contained in:
ginuerzh
2022-12-19 19:34:13 +08:00
parent ceccf65ca1
commit ba87494cef
2 changed files with 10 additions and 8 deletions

View File

@ -7,6 +7,7 @@ type Limiter interface {
// the returned value is less or equal to n.
Wait(ctx context.Context, n int) int
Limit() int
Set(n int)
}
type TrafficLimiter interface {