Documentation ¶
Index ¶
- Constants
- func NewConnLimiter(opts ...Option) limiter.IConnLimiter
- func NewLimiter(n int) limiter.ILimiter
- 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.ILogger) 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.IConnLimiter
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.