rate_limiter

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PluginType = "rate_limiter"

Variables

This section is empty.

Functions

func Init

func Init(_ *coremain.BP, args any) (any, error)

Types

type Args

type Args struct {
	Qps   float64 `yaml:"qps"`
	Burst int     `yaml:"burst"`
	Mask4 int     `yaml:"mask4"`
	Mask6 int     `yaml:"mask6"`
}

type RateLimiter

type RateLimiter struct {
	// contains filtered or unexported fields
}

func New

func New(args Args) (*RateLimiter, error)

func (*RateLimiter) Close

func (s *RateLimiter) Close() error

func (*RateLimiter) Match added in v5.3.0

func (s *RateLimiter) Match(ctx context.Context, qCtx *query_context.Context) (bool, error)

Jump to

Keyboard shortcuts

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