client_limiter

package
v4.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PluginType = "client_limiter"

Variables

This section is empty.

Functions

func Init

func Init(bp *coremain.BP, args interface{}) (p coremain.Plugin, err error)

Init is a handler.NewPluginFunc.

Types

type Args

type Args struct {
	MaxQPS int `yaml:"max_qps"`
	V4Mask int `yaml:"v4_mask"` // default is 32
	V6Mask int `yaml:"v6_mask"` // default is 48
}

type Limiter

type Limiter struct {
	*coremain.BP
	// contains filtered or unexported fields
}

func NewLimiter

func NewLimiter(bp *coremain.BP, args *Args) (*Limiter, error)

func (*Limiter) Close

func (l *Limiter) Close() error

func (*Limiter) Exec

Jump to

Keyboard shortcuts

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