Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircuitBreaker ¶
type CircuitBreaker struct{}
func NewCircuitBreaker ¶
func NewCircuitBreaker() *CircuitBreaker
func (CircuitBreaker) Handler ¶
func (CircuitBreaker) Handler(proxyRoute gobis.ProxyRoute, params interface{}, handler http.Handler) (http.Handler, error)
func (CircuitBreaker) Schema ¶
func (CircuitBreaker) Schema() interface{}
type CircuitBreakerConfig ¶
type CircuitBreakerConfig struct {
CircuitBreaker *CircuitBreakerOptions `mapstructure:"circuit_breaker" json:"circuit_breaker" yaml:"circuit_breaker"`
}
type CircuitBreakerOptions ¶
type CircuitBreakerOptions struct { // Enabled enable conn limit middleware Enabled bool `mapstructure:"enabled" json:"enabled" yaml:"enabled"` // Expression Limit number of simultaneous connection (default to 20) Expression string `mapstructure:"expression" json:"expression" yaml:"expression"` // FallbackUrl Identify request source to limit the source // possible value are 'client.ip', 'request.host' or 'request.header.X-My-Header-Name' // (default: client.ip) FallbackUrl string `mapstructure:"fallback_url" json:"fallback_url" yaml:"fallback_url"` // FallbackDuration is how long the CircuitBreaker will remain in the Tripped in second // state before trying to recover. FallbackDuration int64 `mapstructure:"fallback_duration" json:"fallback_duration" yaml:"fallback_duration"` // RecoveryDuration is how long the CircuitBreaker will take to ramp up in second // requests during the Recovering state. RecoveryDuration int64 `mapstructure:"recovery_duration" json:"recovery_duration" yaml:"recovery_duration"` // CheckPeriod is how long the CircuitBreaker will wait between successive in second // checks of the breaker condition. CheckPeriod int64 `mapstructure:"check_period" json:"check_period" yaml:"check_period"` }
Click to show internal directories.
Click to hide internal directories.