package
0.0.0-20240905054604-4a7eabdd9ba7
Repository: https://github.com/zmicro-team/ztlib.git
Documentation: pkg.go.dev

# Functions

NewPeriodFailureStore returns a PeriodFailureLimit with given parameters.
NewPeriodStore returns a PeriodLimit with given parameters.
NewTokenLimit returns a new TokenLimit that allows events up to rate and permits bursts of at most burst tokens.

# Structs

A PeriodFailureStore is used to limit requests when failure during a period of time.
A PeriodStore is used to limit requests during a period of time.
TokenLimit controls how frequently events are allowed to happen with in one second.