Documentation ¶
Overview ¶
Package backoff implements the backoff strategy for gRPC calls from client. https://github.com/grpc/grpc-go/blob/master/internal/backoff/backoff.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ BaseDelay: 2.0 * time.Second, Multiplier: 3.0, MaxDelay: 15.0 * time.Second, Jitter: 0.2, }
DefaultConfig is a backoff configuration with the default values specified at https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // BaseDelay is the amount of time to backoff after the first failure. BaseDelay time.Duration // Multiplier is the factor with which to multiply backoffs after a // failed retry. Should ideally be greater than 1. Multiplier float64 // MaxDelay is the upper bound of backoff delay. MaxDelay time.Duration // Jitter is the factor with which backoffs are randomized. Jitter float64 }
Config defines the configuration options for backoff
Click to show internal directories.
Click to hide internal directories.