limitpool

package module
v0.0.0-...-0c1bc9f Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const IDLE_DEADLINE_PERIOD = 30

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

func NewPool

func NewPool(limit rate.Limit, burst int) (p *Pool)

func (*Pool) Tokens

func (p *Pool) Tokens(key any) float64

func (*Pool) Wait

func (p *Pool) Wait(ctx context.Context, key any) error

func (*Pool) WaitN

func (p *Pool) WaitN(ctx context.Context, key any, n int) (err error)

Jump to

Keyboard shortcuts

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