throttler

package
v1.6.0-preview.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory added in v1.5.0

type Factory struct {
	Stats stats.Stats
	// contains filtered or unexported fields
}

func New added in v1.5.0

func New(stats stats.Stats) (*Factory, error)

New constructs a new Throttler Factory

func (*Factory) Get added in v1.5.0

func (f *Factory) Get(destName, destID string) *Throttler

type Throttler

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

func (*Throttler) CheckLimitReached

func (t *Throttler) CheckLimitReached(key string, cost int64) (limited bool, retErr error)

CheckLimitReached returns true if we're not allowed to process the number of events we asked for with cost.

Jump to

Keyboard shortcuts

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