throttler

package
v2.22.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultThrottler

type DefaultThrottler struct{}

DefaultThrottler doesn't throttle at all.

func (DefaultThrottler) IsAllowed

func (t DefaultThrottler) IsAllowed(operation string) bool

IsAllowed implements Throttler#IsAllowed.

type Throttler

type Throttler interface {
	// IsAllowed determines whether the operation should be allowed and not be
	// throttled.
	IsAllowed(operation string) bool
}

Throttler is used to rate limits operations. For example, given how debug spans are always sampled, a throttler can be enabled per client to rate limit the amount of debug spans a client can start.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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