limiter

package
v0.0.0-...-132f7fb Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowLimiter

type FlowLimiter struct {
	FlowLmiterMap   map[string]*FlowLimiterItem
	FlowLmiterSlice []*FlowLimiterItem
	Locker          sync.RWMutex
}
var FlowLimiterHandler *FlowLimiter

func NewFlowLimiter

func NewFlowLimiter() *FlowLimiter

func (*FlowLimiter) GetLimiter

func (counter *FlowLimiter) GetLimiter(serverName string, qps float64) (*rate.Limiter, error)

type FlowLimiterItem

type FlowLimiterItem struct {
	ServiceName string
	Limter      *rate.Limiter
}

Jump to

Keyboard shortcuts

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