Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLimitExceed = errors.New("Rate limit exceed!")
Functions ¶
func NewTokenBucketLimitterWithBuildIn ¶
func NewTokenBucketLimitterWithBuildIn(bkt *rate.Limiter) endpoint.Middleware
NewTokenBucketLimitterWithBuildIn 使用x/time/rate创建限流中间件
func NewTokenBucketLimitterWithJuju ¶
func NewTokenBucketLimitterWithJuju(bkt *ratelimit.Bucket) endpoint.Middleware
NewTokenBucketLimitterWithJuju 使用juju/ratelimit创建限流中间件
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.