Documentation
¶
Overview ¶
Package backpressure contains code applying control signals issued by controller to Go runtime and and to gRPC server.
Index ¶
Constants ¶
View Source
const ( // DefaultGOGC - default GOGC value. DefaultGOGC = 100 // NoThrottling - allow execution of all GRPC requests. NoThrottling = 0 // FullThrottling - a complete ban on GRPC request execution. FullThrottling = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operator ¶
type Operator interface {
// SetControlParameters registers the actual value of control parameters.
SetControlParameters(value *stats.ControlParameters) error
// AllowRequest can be used by server middleware to check if it's possible to execute
// a particular request.
AllowRequest() bool
// GetStats returns statistics of Backpressure subsystem.
GetStats() (*stats.BackpressureStats, error)
}
Operator applies control signals to Go runtime and GRPC server.
type OperatorMock ¶
func (*OperatorMock) AllowRequest ¶
func (m *OperatorMock) AllowRequest() bool
func (*OperatorMock) GetStats ¶
func (m *OperatorMock) GetStats() (*stats.BackpressureStats, error)
func (*OperatorMock) SetControlParameters ¶
func (m *OperatorMock) SetControlParameters(value *stats.ControlParameters) error
Click to show internal directories.
Click to hide internal directories.