Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CircuitHealthCheck ¶
CircuitHealthCheck will report if a circuit is open
Types ¶
type DefaultCircuit ¶
type DefaultCircuit struct {
// contains filtered or unexported fields
}
func NewDefaultCircuit ¶
func NewDefaultCircuit(opts Options) *DefaultCircuit
func (*DefaultCircuit) Open ¶
func (r *DefaultCircuit) Open() bool
func (*DefaultCircuit) Result ¶
func (r *DefaultCircuit) Result(err error)
type Options ¶
type Options struct { Disabled bool `json:"disabled,omitempty"` // Rate threshold config Threshold float64 `json:"threshold,omitempty"` MinSamples int64 `json:"minSamples,omitempty"` // Backoff config Multiplier float64 `json:"multiplier,omitempty"` RandomizationFactor float64 `json:"randomizationFactor,omitempty"` InitialIntervalMs int64 `json:"initialIntervalMs,omitempty"` MaxIntervalMs int64 `json:"maxIntervalMs,omitempty"` MaxElapsedTimeMs int64 `json:"maxElapsedTimeMs,omitempty"` }
Click to show internal directories.
Click to hide internal directories.