ratelimit

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDelayingLimiter

func NewDelayingLimiter(limit Waiter) endpoint.Middleware

func NewErrorLimiter

func NewErrorLimiter(limit Allower) endpoint.Middleware

Types

type Allower added in v0.9.4

type Allower interface {
	Allow() bool
}

type Waiter added in v0.9.4

type Waiter interface {
	Wait(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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