retry

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MiddlewareOption

type MiddlewareOption func(*middlewareOptions)

MiddlewareOption customizes the behavior of a retry middleware.

func PerRequestTimeout

func PerRequestTimeout(timeout time.Duration) MiddlewareOption

PerRequestTimeout is the Timeout we will enforce per request (if this is less than the context deadline, we'll use that instead).

Defaults to 1 second.

func Retries

func Retries(retries int) MiddlewareOption

Retries is the number of attempts we will retry (after the initial attempt.

Defaults to 1.

type OutboundMiddleware

type OutboundMiddleware struct {
	// contains filtered or unexported fields
}

OutboundMiddleware is a retry middleware that wraps a UnaryOutbound with Middleware.

func NewUnaryMiddleware

func NewUnaryMiddleware(opts ...MiddlewareOption) *OutboundMiddleware

NewUnaryMiddleware creates a new Retry Middleware

func (*OutboundMiddleware) Call

Call implements the middleware.UnaryOutbound interface.

Jump to

Keyboard shortcuts

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