Versions in this module Expand all Collapse all v0 v0.7.0 Dec 22, 2014 Changes in this version + func MustParseExpression(in string) threshold.Predicate + func ParseExpression(in string) (threshold.Predicate, error) + type CircuitBreaker struct + func New(condition threshold.Predicate, fallback middleware.Middleware, options Options) (*CircuitBreaker, error) + func (c *CircuitBreaker) ProcessRequest(r request.Request) (*http.Response, error) + func (c *CircuitBreaker) ProcessResponse(r request.Request, a request.Attempt) + func (c *CircuitBreaker) String() string + type Options struct + CheckPeriod time.Duration + FallbackDuration time.Duration + OnStandby SideEffect + OnTripped SideEffect + RecoveryDuration time.Duration + TimeProvider timetools.TimeProvider + type Redirect struct + URL string + type RedirectFallback struct + func NewRedirectFallback(r Redirect) (*RedirectFallback, error) + func (f *RedirectFallback) ProcessRequest(r request.Request) (*http.Response, error) + func (f *RedirectFallback) ProcessResponse(r request.Request, a request.Attempt) + type Response struct + Body []byte + ContentType string + StatusCode int + type ResponseFallback struct + func NewResponseFallback(r Response) (*ResponseFallback, error) + func (f *ResponseFallback) ProcessRequest(r request.Request) (*http.Response, error) + func (f *ResponseFallback) ProcessResponse(r request.Request, a request.Attempt) + type SideEffect interface + Exec func() error + type Webhook struct + Body []byte + Form url.Values + Headers http.Header + Method string + URL string + type WebhookSideEffect struct + func NewWebhookSideEffect(w Webhook) (*WebhookSideEffect, error) + func (w *WebhookSideEffect) Exec() error