decorator

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRetryingProcessor

func NewRetryingProcessor(f metrics.Factory, processor processor.SpanProcessor, opts ...RetryOption) processor.SpanProcessor

NewRetryingProcessor returns a processor that retries failures using an exponential backoff with jitter.

Types

type RetryOption

type RetryOption func(*retryOptions)

RetryOption allows setting options for exponential backoff retried

func MaxAttempts

func MaxAttempts(attempts uint) RetryOption

MaxAttempts sets the maximum number of attempts to retry

func MaxBackoffInterval

func MaxBackoffInterval(t time.Duration) RetryOption

MaxBackoffInterval sets the maximum backoff interval

func MinBackoffInterval

func MinBackoffInterval(t time.Duration) RetryOption

MinBackoffInterval sets the minimum backoff interval

func PropagateError

func PropagateError(b bool) RetryOption

PropagateError sets whether to propagate errors when retries are exhausted

func Rand

func Rand(r randInt63) RetryOption

Rand sets a random number generator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL