limiter

package
v1.185.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(New),
)

Module for fx.

Functions

func IsEnabled added in v1.166.0

func IsEnabled(cfg *Config) bool

IsEnabled limiter.

func New

func New(cfg *Config) (*limiter.Limiter, error)

New limiter.

Types

type Config added in v1.166.0

type Config struct {
	Kind    string `yaml:"kind,omitempty" json:"kind,omitempty" toml:"kind,omitempty"`
	Pattern string `yaml:"pattern,omitempty" json:"pattern,omitempty" toml:"pattern,omitempty"`
}

Config for limiter.

type KeyFunc

type KeyFunc func(context.Context) meta.Valuer

KeyFunc for the limiter.

Jump to

Keyboard shortcuts

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