Versions in this module Expand all Collapse all v1 v1.2.0 Sep 29, 2021 v1.1.8 Sep 29, 2021 Changes in this version + var ErrServiceOverloaded = errors.New("service overloaded") + func Disable() + 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()