Documentation ¶
Index ¶
- Constants
- func NewConnLimiter(opts ...Option) limiter.ConnLimiter
- func NewLimiter(n int) limiter.Limiter
- type ConnLimitGenerator
- 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 = "$" IPLimitKey = "$$" )
Variables ¶
This section is empty.
Functions ¶
func NewConnLimiter ¶
func NewConnLimiter(opts ...Option) limiter.ConnLimiter
func NewLimiter ¶
Types ¶
type ConnLimitGenerator ¶
func NewConnLimitGenerator ¶
func NewConnLimitGenerator(n int) ConnLimitGenerator
func NewConnLimitSingleGenerator ¶
func NewConnLimitSingleGenerator(n int) ConnLimitGenerator
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.