limiter

package
v0.0.0-...-a8b8e24 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLimitExceeded = errors.New("Resource limit exceeded")

Functions

This section is empty.

Types

type Limiter

type Limiter interface {
	TakeTicket() (Ticket, error)
}

func NewInflightRequestLimiter

func NewInflightRequestLimiter(name string, maxRequests int) Limiter

func NewNoopRequestLimiter

func NewNoopRequestLimiter() Limiter

type Ticket

type Ticket interface {
	Return()
}

Jump to

Keyboard shortcuts

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