ratelimit

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeNode = "ratelimit"
)

Variables

This section is empty.

Functions

func Deregister

func Deregister(name string)

Deregister 清理配置适配器

func NewBuilder

func NewBuilder() container.StandardBuilder

func Register

func Register(resolver Resover)

Register 注册配置文件适配器

Types

type DoneFunc

type DoneFunc = ratelimit.DoneFunc

type DoneInfo

type DoneInfo = ratelimit.DoneInfo

type Limiter

type Limiter = ratelimit.Limiter

type Provider

type Provider interface {
	Name() string
	Limiter() Limiter
	GetImpl() interface{}
}

type Resover

type Resover interface {
	Name() string
	Resolve(name string, config config.Config) (Provider, error)
}

resover 定义配置文件转换方法

type Standard

type Standard interface {
	GetProvider(name string) (q Provider)
}

Standard

func NewStandard

func NewStandard(c container.Container) Standard

NewStandar

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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