throttle

package
v0.0.0-...-37c3036 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Throttler

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

func (*Throttler) Refund

func (t *Throttler) Refund(org string)

func (*Throttler) Throttle

func (t *Throttler) Throttle(hourlyTokens, burst int, orgs ...string) error

Throttle client to a rate of at most hourlyTokens requests per hour, allowing burst tokens.

func (*Throttler) Wait

func (t *Throttler) Wait(ctx context.Context, org string) error

Jump to

Keyboard shortcuts

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