Documentation ¶
Index ¶
- Constants
- func NewLimiter(r int) limiter.Limiter
- func NewTrafficLimiter(opts ...Option) limiter.TrafficLimiter
- type Option
- func FileLoaderOption(fileLoader loader.Loader) Option
- func HTTPLoaderOption(httpLoader loader.Loader) Option
- func LimitsOption(limits ...string) Option
- func LoggerOption(logger logger.Logger) Option
- func RedisLoaderOption(redisLoader loader.Loader) Option
- func ReloadPeriodOption(period time.Duration) Option
Constants ¶
View Source
const ( GlobalLimitKey = "$" ConnLimitKey = "$$" )
Variables ¶
This section is empty.
Functions ¶
func NewLimiter ¶
func NewTrafficLimiter ¶
func NewTrafficLimiter(opts ...Option) limiter.TrafficLimiter
Types ¶
type Option ¶
type Option func(opts *options)
func FileLoaderOption ¶
func HTTPLoaderOption ¶
func LimitsOption ¶
func LoggerOption ¶
func RedisLoaderOption ¶
func ReloadPeriodOption ¶
Click to show internal directories.
Click to hide internal directories.