MCPcopy
hub / github.com/redis/go-redis / IsOpen

Method IsOpen

maintnotifications/circuit_breaker.go:82–85  ·  view source on GitHub ↗

IsOpen returns true if the circuit breaker is open (rejecting requests)

()

Source from the content-addressed store, hash-verified

80
81// IsOpen returns true if the circuit breaker is open (rejecting requests)
82func (cb *CircuitBreaker) IsOpen() bool {
83 state := CircuitBreakerState(cb.state.Load())
84 return state == CircuitBreakerOpen
85}
86
87// shouldAttemptReset checks if enough time has passed to attempt reset
88func (cb *CircuitBreaker) shouldAttemptReset() bool {

Callers 2

TestCircuitBreakerFunction · 0.80

Calls 2

CircuitBreakerStateTypeAlias · 0.85
LoadMethod · 0.45

Tested by 1

TestCircuitBreakerFunction · 0.64