add Set for traffic Limiter

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

No files matched your search

+1
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 {