Versions in this module Expand all Collapse all v1 v1.0.1 Feb 8, 2024 v1.0.0 Feb 8, 2024 Changes in this version + const StateClosed + const StateOpen + var ErrNotAllowed = errors.New("circuitbreaker: not allowed for circuit open") + type Breaker struct + func (b *Breaker) Allow() error + func (b *Breaker) MarkFailed() + func (b *Breaker) MarkSuccess() + type CircuitBreaker interface + Allow func() error + MarkFailed func() + MarkSuccess func() + func NewBreaker(opts ...Option) CircuitBreaker + type Option func(*options) + func WithBucket(b int) Option + func WithRequest(r int64) Option + func WithSuccess(s float64) Option + func WithWindow(d time.Duration) Option