Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPickStrategy ¶
func WithPickStrategy[T any](pickStrategy func([]*Limiter[T]) *Limiter[T]) func(*RotationalSlice[T])
Types ¶
type Limiter ¶
func DefaultPickStrategy ¶
func NewLimiter ¶
NewLimiter allow r executions per second
type RotationalSlice ¶
type RotationalSlice[T any] struct { // contains filtered or unexported fields }
func NewRotationalSlice ¶
func NewRotationalSlice[T any](slice []T, r int, options ...func(*RotationalSlice[T])) (*RotationalSlice[T], error)
Click to show internal directories.
Click to hide internal directories.