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
Click to show internal directories.
Click to hide internal directories.