Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CircuitExists ¶ added in v0.182.40
func IsCircuitOpen ¶ added in v0.182.40
Expects a circuit to exist because a new circuit is always closed. Call CircuitExists to check if a circuit exists.
Types ¶
type CircuitBreaker ¶
type CircuitBreaker struct {
// contains filtered or unexported fields
}
func NewCircuitBreaker ¶
func NewCircuitBreaker(config Config) *CircuitBreaker
func (*CircuitBreaker) Execute ¶
func (cb *CircuitBreaker) Execute(cmd *Command) CommandResult
Executes the command in its circuit if set. If the command's circuit is not configured, the circuit of the CircuitBreaker is used. This is a blocking function.
func (*CircuitBreaker) SetOverrideCircuitNameHandler ¶ added in v0.182.40
func (c *CircuitBreaker) SetOverrideCircuitNameHandler(f func(string) string)
type CommandResult ¶
type CommandResult struct {
// contains filtered or unexported fields
}
func (CommandResult) Error ¶
func (cr CommandResult) Error() error
func (CommandResult) Result ¶
func (cr CommandResult) Result() []any
type FallbackFunc ¶
type Functor ¶
type Functor struct {
// contains filtered or unexported fields
}
func NewFunctor ¶
func NewFunctor(exec FallbackFunc, circuitName string) *Functor
Click to show internal directories.
Click to hide internal directories.