Versions in this module Expand all Collapse all v0 v0.0.2 Jun 5, 2022 Changes in this version + var ErrServiceOverloaded = errors.New("service overloaded") + func Disable() + func DisableLog() + type Promise interface + Fail func() + Pass func() + type Shedder interface + Allow func() (Promise, error) + func NewAdaptiveShedder(opts ...ShedderOption) Shedder + type ShedderGroup struct + func NewShedderGroup(opts ...ShedderOption) *ShedderGroup + func (g *ShedderGroup) GetShedder(key string) Shedder + type ShedderOption func(opts *shedderOptions) + func WithBuckets(buckets int) ShedderOption + func WithCpuThreshold(threshold int64) ShedderOption + func WithWindow(window time.Duration) ShedderOption + type SheddingStat struct + func NewSheddingStat(name string) *SheddingStat + func (s *SheddingStat) IncrementDrop() + func (s *SheddingStat) IncrementPass() + func (s *SheddingStat) IncrementTotal()