limiter

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntervalLimiter

type IntervalLimiter struct {
	// contains filtered or unexported fields
}

IntervalLimiter ensures each allowed call is spaced by `interval`. It serializes concurrent callers: they will line up and each gets its own slot.

func NewIntervalLimiter

func NewIntervalLimiter(interval time.Duration) *IntervalLimiter

func (*IntervalLimiter) Wait

func (l *IntervalLimiter) Wait(ctx context.Context) error

Jump to

Keyboard shortcuts

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