Versions in this module Expand all Collapse all v0 v0.2.1 Nov 1, 2025 Changes in this version + type CBManager struct + func NewCBManager() *CBManager + func (m *CBManager) AllowRequest(serverURL string) (bool, State) + func (m *CBManager) GetCircuitBreaker(serverURL string) *circuitBreaker + func (m *CBManager) GetCircuitBreakerState(serverURL string) string + func (m *CBManager) GetCircuitBreakerStats() map[string]any + func (m *CBManager) InitCircuitBreakers(servers []string, cfg CircuitBreakerConf) (cbInitErr []error) + func (m *CBManager) ReportFailure(serverURL string) + func (m *CBManager) ReportSuccess(serverURL string) v0.1.0 Sep 12, 2025 Changes in this version + const Version + var CircuitBreakers map[string]*CircuitBreaker + func AllowRequest(serverURL string) bool + func GetCircuitBreakerState(serverURL string) string + func GetCircuitBreakerStats() map[string]any + func InitCircuitBreakers(servers []string, cfg CircuitBreakerConf) + func ReportFailure(serverURL string) + func ReportSuccess(serverURL string) + type CircuitBreaker struct + func GetCircuitBreaker(serverURL string) *CircuitBreaker + func New(name string, config CircuitBreakerConf) *CircuitBreaker + func (cb *CircuitBreaker) Allow() bool + func (cb *CircuitBreaker) Failure() + func (cb *CircuitBreaker) State() State + func (cb *CircuitBreaker) Stats() map[string]any + func (cb *CircuitBreaker) Success() + type CircuitBreakerConf struct + FailureThreshold int + HalfOpenPrc int + RecoveryTimeout time.Duration + SuccessThreshold int + type State int + const StateClosed + const StateHalfOpen + const StateOpen + func (s State) String() string