Documentation ¶
Overview ¶
Package ratelimiting provides rate limiting tools for sentinel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlwaysAllowLimiter ¶
type AlwaysAllowLimiter struct{}
AlwaysAllowLimiter always passes requests.
func NewAlwaysAllowLimiter ¶
func NewAlwaysAllowLimiter() *AlwaysAllowLimiter
func (*AlwaysAllowLimiter) Limit ¶
func (l *AlwaysAllowLimiter) Limit() bool
type TokenBucketLimiter ¶
type TokenBucketLimiter struct {
// contains filtered or unexported fields
}
TokenBucketLimiter does rate limiting based on token bucket algorithm.
func NewTokenBucketLimiter ¶
func NewTokenBucketLimiter(store limiter.Store) *TokenBucketLimiter
func (*TokenBucketLimiter) Limit ¶
func (l *TokenBucketLimiter) Limit() bool
Click to show internal directories.
Click to hide internal directories.