package
1.20240719.1
Repository: https://github.com/blend/go-sdk.git
Documentation: pkg.go.dev

# Functions

ErrIsOpen returns if the error is an ErrOpenState.
ErrIsTooManyRequests returns if the error is an ErrTooManyRequests.
New creates a new breaker with the given options.
OptClosedExpiryInterval sets the ClosedExpiryInterval.
OptConfig sets the breaker based on a config.
OptHalfOpenMaxActions sets the HalfOpenMaxActions.
OptNowProvider sets the now provider on the breaker.
OptOnStateChange sets the OnStateChange handler on the breaker.
OptOpenAction sets the open action on the breaker.
OptOpenExpiryInterval sets the OpenExpiryInterval.
OptOpenFailureThreshold sets the OpenFailureThreshold.
OptShouldOpenProvider sets the ShouldCloseProvider provider on the breaker.

# Constants

Constants.
Constants.
Constants.
Constants.
These constants are states of CircuitBreaker.
These constants are states of CircuitBreaker.
These constants are states of CircuitBreaker.

# Variables

ErrOpenState is returned when the CB state is open.
ErrTooManyRequests is returned when the CB state is half open and the requests count is over the cb maxRequests.

# Structs

Breaker is a state machine to prevent performing actions that are likely to fail.
Config is the breaker config.
Counts holds the numbers of requests and their successes/failures.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Option is a mutator for a breaker.
No description provided by the author
State is a type that represents a state of CircuitBreaker.