Versions in this module Expand all Collapse all v0 v0.2.0 Oct 18, 2026 v0.1.0 Oct 17, 2026 Changes in this version + const DefaultCooldown + const DefaultProbeTimeout + const DefaultTripThreshold + type Breaker struct + func New(trip int, cooldown time.Duration) *Breaker + func (b *Breaker) Abandon() + func (b *Breaker) AbandonGen(gen uint64) + func (b *Breaker) Allow(now time.Time) bool + func (b *Breaker) AllowGen(now time.Time) (bool, uint64) + func (b *Breaker) Failure(now time.Time) + func (b *Breaker) FailureGen(now time.Time, gen uint64) + func (b *Breaker) Opened(now time.Time) bool + func (b *Breaker) Success() + func (b *Breaker) SuccessGen(gen uint64) + func (b *Breaker) WithProbeTimeout(d time.Duration) *Breaker + type Breakers struct + Now func() time.Time + func NewBreakers(trip int, cooldown time.Duration, opts ...Option) *Breakers + func (bs *Breakers) Abandon(name string) + func (bs *Breakers) AbandonGen(name string, gen uint64) + func (bs *Breakers) Allow(name string) bool + func (bs *Breakers) AllowGen(name string) (bool, uint64) + func (bs *Breakers) Failure(name string) + func (bs *Breakers) FailureGen(name string, gen uint64) + func (bs *Breakers) Opened(name string) bool + func (bs *Breakers) Success(name string) + func (bs *Breakers) SuccessGen(name string, gen uint64) + type Option func(*Breakers) + func WithProbeTimeout(d time.Duration) Option