throttle

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewThrottler

func NewThrottler(config *ServiceOperationsThrottleConfig) *throttler

NewThrottler constructs new request throttler instance.

Types

type Condition

type Condition func(r *request.Request) bool

type ServiceOperationsThrottleConfig

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

serviceOperationsThrottleConfig is throttleConfig for each service's operations. It supports to be configured using flags with format like "${serviceID}:${operationRegex}={rate}:{burst}" e.g. "appmesh:DescribeMesh=1.3:5,appmesh:Create.*=1.7:3" Note: default throttle for each service will be cleared if any override is set for that service.

func NewDefaultServiceOperationsThrottleConfig

func NewDefaultServiceOperationsThrottleConfig() *ServiceOperationsThrottleConfig

NewDefaultServiceOperationsThrottleConfig returns a ServiceOperationsThrottleConfig with default settings.

func (*ServiceOperationsThrottleConfig) Set

func (*ServiceOperationsThrottleConfig) String

func (*ServiceOperationsThrottleConfig) Type

Jump to

Keyboard shortcuts

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