circuit

package
v0.9.149 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Overview

Package circuit provides filters to control the circuit breaker settings on the route level.

For detailed documentation of the circuit breakers, see https://godoc.org/github.com/zalando/skipper/circuit.

Index

Constants

View Source
const (
	ConsecutiveBreakerName = "consecutiveBreaker"
	RateBreakerName        = "rateBreaker"
	DisableBreakerName     = "disableBreaker"
	RouteSettingsKey       = "#circuitbreakersettings"
)

Variables

This section is empty.

Functions

func NewConsecutiveBreaker

func NewConsecutiveBreaker() filters.Spec

NewConsecutiveBreaker creates a filter specification to instantiate consecutiveBreaker() filters.

These filters set a breaker for the current route that open if the backend failures for the route reach a value of N, where N is a mandatory argument of the filter:

consecutiveBreaker(15)

The filter accepts the following optional arguments: timeout (milliseconds or duration string), half-open-requests (integer), idle-ttl (milliseconds or duration string).

func NewDisableBreaker

func NewDisableBreaker() filters.Spec

NewDisableBreaker disables the circuit breaker for a route. It doesn't accept any arguments.

func NewRateBreaker

func NewRateBreaker() filters.Spec

NewRateBreaker creates a filter specification to instantiate rateBreaker() filters.

These filters set a breaker for the current route that open if the backend failures for the route reach a value of N within a window of the last M requests, where N and M are mandatory arguments of the filter:

rateBreaker(30, 300)

The filter accepts the following optional arguments: timeout (milliseconds or duration string), half-open-requests (integer), idle-ttl (milliseconds or duration string).

Types

This section is empty.

Jump to

Keyboard shortcuts

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