Documentation ¶
Index ¶
- type Settings
- type TwoStepCircuitBreaker
- type TwoStepCircuitBreakerWithDynamicSettings
- func (c *TwoStepCircuitBreakerWithDynamicSettings) Allow() (done func(success bool), err error)
- func (c *TwoStepCircuitBreakerWithDynamicSettings) Counts() gobreaker.Counts
- func (c *TwoStepCircuitBreakerWithDynamicSettings) Name() string
- func (c *TwoStepCircuitBreakerWithDynamicSettings) State() gobreaker.State
- func (c *TwoStepCircuitBreakerWithDynamicSettings) UpdateSettings(ds dynamicconfig.CircuitBreakerSettings)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TwoStepCircuitBreaker ¶
type TwoStepCircuitBreakerWithDynamicSettings ¶
type TwoStepCircuitBreakerWithDynamicSettings struct {
// contains filtered or unexported fields
}
TwoStepCircuitBreakerWithDynamicSettings is a wrapper of gobreaker.TwoStepCircuitBreaker that calls the settingsFn everytime the Allow function is called and replaces the circuit breaker if there is a change in the settings object. Note that in this case, the previous state of the circuit breaker is lost.
func NewTwoStepCircuitBreakerWithDynamicSettings ¶
func NewTwoStepCircuitBreakerWithDynamicSettings( settings Settings, ) *TwoStepCircuitBreakerWithDynamicSettings
Caller must call UpdateSettings once before using this object.
func (*TwoStepCircuitBreakerWithDynamicSettings) Allow ¶
func (c *TwoStepCircuitBreakerWithDynamicSettings) Allow() (done func(success bool), err error)
func (*TwoStepCircuitBreakerWithDynamicSettings) Counts ¶
func (c *TwoStepCircuitBreakerWithDynamicSettings) Counts() gobreaker.Counts
func (*TwoStepCircuitBreakerWithDynamicSettings) Name ¶
func (c *TwoStepCircuitBreakerWithDynamicSettings) Name() string
func (*TwoStepCircuitBreakerWithDynamicSettings) State ¶
func (c *TwoStepCircuitBreakerWithDynamicSettings) State() gobreaker.State
func (*TwoStepCircuitBreakerWithDynamicSettings) UpdateSettings ¶
func (c *TwoStepCircuitBreakerWithDynamicSettings) UpdateSettings( ds dynamicconfig.CircuitBreakerSettings, )
Click to show internal directories.
Click to hide internal directories.