Versions in this module Expand all Collapse all v1 v1.0.0 Aug 3, 2021 Changes in this version + var DefaultBackoff = 2 + var DefaultRetryCount int = 5 + var ErrRetryMaxLimit = errors.New("Retry Limit Exceed!") + var ExponetialFactor = 1.5 + var LinearBackoff = 1 + func IsContextError(err error) bool + func IsRetriable(err error, codes []codes.Code) bool + func RetryClientConnection(factory ClientConnFactory, retryOption *RetryOption) (*grpc.ClientConn, error) + type Backoff struct + Strategy BackoffStrategy + func (b *Backoff) ApplyBackoffDuration(attempt int) + type BackoffStrategy int + const Default + const Exponetial + const Jitter + const Linear + type ClientConnFactory func(address string) (*grpc.ClientConn, error) + type ConnState connectivity.State + const Connecting + const Idle + const Ready + const ShutDown + const TransientFailure + type RetryOption struct + Address string + Backoff *Backoff + Codes []codes.Code + Retry int + func (r *RetryOption) RetryBackoff(attempt int) error