Documentation ¶
Index ¶
- Constants
- func NewLimiter(r int) limiter.ILimiter
- func NewTrafficLimiter(opts ...Option) limiter.ITrafficLimiter
- type Option
- func FileLoaderOption(fileLoader loader.Loader) Option
- func HTTPLoaderOption(httpLoader loader.Loader) Option
- func LimitsOption(limits ...string) Option
- func LoggerOption(logger logger.ILogger) 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.ITrafficLimiter
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.