Versions in this module Expand all Collapse all v0 v0.1.0 Jul 1, 2026 Changes in this version + type Lease struct + ID string + Value string + type Options struct + Cooldown time.Duration + Now func() time.Time + Rand *rand.Rand + Rotation string + StateFile string + type Pool struct + func New(o Options) *Pool + func (p *Pool) Entries() []Lease + func (p *Pool) LoadState() error + func (p *Pool) MarkChecked(id string, live bool) + func (p *Pool) Penalize(id string, d time.Duration) + func (p *Pool) Quarantine(id string, d time.Duration) + func (p *Pool) RecordUse(id string, status int) + func (p *Pool) Release(id string, ok bool) + func (p *Pool) Save() error + func (p *Pool) SetTokens(lines []string) + func (p *Pool) SetValue(id, value string) + func (p *Pool) Status() Snapshot + func (p *Pool) Take() (Lease, bool) + type Snapshot struct + Cooling int + Dead int + Live int + Quarantined int + Tokens []TokenView + Total int + Unknown int + type Status string + const Dead + const Live + const Quarantined + const Unknown + type Token struct + CoolingUntil time.Time + Errors int64 + Fails int + ID string + LastCheck time.Time + LastStatus int + LastUsed time.Time + Requests int64 + Status Status + Value string + Weight int + type TokenView struct + Cooling bool + Errors int64 + Fails int + ID string + LastCheck time.Time + LastStatus int + LastUsed time.Time + Requests int64 + Status Status + Weight int