throttle

package
v0.0.0-...-ba4152c Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 14 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.

func WithSDKRequestThrottleMiddleware

func WithSDKRequestThrottleMiddleware(throttler *throttler) func(stack *smithymiddleware.Stack) error

WithSDKRequestThrottleMiddleware is a middleware that applies client side rate limiting to the clients. This is added in finalize step of middleware stack and is called before each request in middleware chain

Types

type Condition

type Condition func(ctx context.Context) 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