conn

package
v0.2.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

View Source
const (
	GlobalLimitKey = "$"
	IPLimitKey     = "$$"
)

Variables

This section is empty.

Functions

func NewConnLimiter

func NewConnLimiter(opts ...Option) limiter.ConnLimiter

func NewLimiter

func NewLimiter(n int) limiter.Limiter

Types

type ConnLimitGenerator

type ConnLimitGenerator interface {
	Limiter() limiter.Limiter
}

func NewConnLimitGenerator

func NewConnLimitGenerator(n int) ConnLimitGenerator

func NewConnLimitSingleGenerator

func NewConnLimitSingleGenerator(n int) ConnLimitGenerator

type Option

type Option func(opts *options)

func FileLoaderOption

func FileLoaderOption(fileLoader loader.Loader) Option

func HTTPLoaderOption

func HTTPLoaderOption(httpLoader loader.Loader) Option

func LimitsOption

func LimitsOption(limits ...string) Option

func LoggerOption

func LoggerOption(logger logger.Logger) Option

func RedisLoaderOption

func RedisLoaderOption(redisLoader loader.Loader) Option

func ReloadPeriodOption

func ReloadPeriodOption(period time.Duration) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL