We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 118da26 commit e01ca57Copy full SHA for e01ca57
components/common-go/grpc/ratelimit.go
@@ -26,8 +26,11 @@ type keyFunc func(req interface{}) (string, error)
26
27
// RateLimit configures the reate limit for a function
28
type RateLimit struct {
29
- Block bool `json:"block"`
30
- BucketSize uint `json:"bucketSize"`
+ Block bool `json:"block"`
+ BucketSize uint `json:"bucketSize"`
31
+ // RefillInterval is the rate at which a new token gets added to the bucket.
32
+ // Note that this does _not_ completely refill the bucket, only one token gets added,
33
+ // so effectively this is the rate at which requests can be made.
34
RefillInterval util.Duration `json:"refillInterval"`
35
36
KeyCacheSize uint `json:"keyCacheSize,omitempty"`
0 commit comments