Versions in this module Expand all Collapse all v4 v4.0.0 Jan 19, 2024 Changes in this version + type AtomicBoolean struct + func (a *AtomicBoolean) Get() bool + func (a *AtomicBoolean) MarshalJSON() ([]byte, error) + func (a *AtomicBoolean) Set(value bool) + func (a *AtomicBoolean) String() string + func (a *AtomicBoolean) UnmarshalJSON(b []byte) error + type AtomicInt64 struct + func (a *AtomicInt64) Duration() time.Duration + func (a *AtomicInt64) Get() int64 + func (a *AtomicInt64) MarshalJSON() ([]byte, error) + func (a *AtomicInt64) Set(value int64) + func (a *AtomicInt64) String() string + func (a *AtomicInt64) UnmarshalJSON(b []byte) error + type RollingBuckets struct + BucketWidth time.Duration + LastAbsIndex AtomicInt64 + NumBuckets int + StartTime time.Time + func (r *RollingBuckets) Advance(now time.Time, clearBucket func(int)) int + func (r *RollingBuckets) Store(bucket *RollingBuckets) + func (r *RollingBuckets) String() string + type RollingCounter struct + func NewRollingCounter(bucketWidth time.Duration, numBuckets int, now time.Time) RollingCounter + func (r *RollingCounter) GetBuckets(now time.Time) []int64 + func (r *RollingCounter) Inc(now time.Time) + func (r *RollingCounter) MarshalJSON() ([]byte, error) + func (r *RollingCounter) Reset(now time.Time) + func (r *RollingCounter) RollingSum() int64 + func (r *RollingCounter) RollingSumAt(now time.Time) int64 + func (r *RollingCounter) String() string + func (r *RollingCounter) StringAt(now time.Time) string + func (r *RollingCounter) TotalSum() int64 + func (r *RollingCounter) UnmarshalJSON(b []byte) error + type RollingPercentile struct + func NewRollingPercentile(bucketWidth time.Duration, numBuckets int, bucketSize int, now time.Time) RollingPercentile + func (r *RollingPercentile) AddDuration(d time.Duration, now time.Time) + func (r *RollingPercentile) Reset(now time.Time) + func (r *RollingPercentile) Snapshot() SortedDurations + func (r *RollingPercentile) SnapshotAt(now time.Time) SortedDurations + func (r *RollingPercentile) SortedDurations(now time.Time) []time.Duration + func (r *RollingPercentile) Var() expvar.Var + type SortedDurations []time.Duration + func (s SortedDurations) Max() time.Duration + func (s SortedDurations) Mean() time.Duration + func (s SortedDurations) Min() time.Duration + func (s SortedDurations) Percentile(p float64) time.Duration + func (s SortedDurations) String() string + func (s SortedDurations) Var() expvar.Var + type TimedCheck struct + TimeAfterFunc func(time.Duration, func()) *time.Timer + func (c *TimedCheck) Check(now time.Time) bool + func (c *TimedCheck) MarshalJSON() ([]byte, error) + func (c *TimedCheck) SetEventCountToAllow(newCount int64) + func (c *TimedCheck) SetSleepDuration(newDuration time.Duration) + func (c *TimedCheck) SleepStart(now time.Time) + func (c *TimedCheck) String() string + func (c *TimedCheck) UnmarshalJSON(b []byte) error Other modules containing this package github.com/cep21/circuit github.com/cep21/circuit/v3