package
3.0.0-rc.3+incompatible
Repository: https://github.com/vitessio/vitess.git
Documentation: pkg.go.dev

# Packages

Package grpcthrottlerclient contains the gRPC version of the throttler client protocol.
Package grpcthrottlerserver contains the gRPC implementation of the server side of the throttler service.
Package throttlerclient defines the generic RPC client interface for the throttler service.
Package throttlerclienttest contains the testsuite against which each RPC implementation of the throttlerclient interface must be tested.

# Functions

DefaultMaxReplicationLagModuleConfig returns a copy of the default config object.
NewMaxRateModule will create a new module instance and set the initial rate limit to maxRate.
NewMaxReplicationLagModule will create a new module instance and set the initial max replication lag limit to maxReplicationLag.
NewMaxReplicationLagModuleConfig returns a default configuration where only "maxReplicationLag" is set.
NewThrottler creates a new Throttler instance.

# Constants

InvalidMaxRate is a constant which will fail in a NewThrottler() call.
InvalidMaxReplicationLag is a constant which will fail in a NewThrottler() call.
MaxRateModuleDisabled can be set in NewThrottler() to disable throttling by a fixed rate.
NotThrottled will be returned by Throttle() if the application is currently not throttled.
ReplicationLagModuleDisabled can be set in NewThrottler() to disable throttling based on the MySQL replication lag.
ZeroRateNoProgess can be used to set maxRate to 0.

# Variables

GlobalManager is the per-process manager which manages all active throttlers.

# Structs

MaxRateModule allows to set and retrieve a maximum rate limit.
MaxReplicationLagModule calculates the maximum rate based on observed replication lag and throttler rate changes.
MaxReplicationLagModuleConfig stores all configuration parameters for MaxReplicationLagModule.
Throttler provides a client-side, thread-aware throttler.

# Interfaces

Manager defines the public interface of the throttler manager.
Module specifies the API for a Decision Module which can tell the throttler to dynamically increase or decrease the current rate limit.