Versions in this module Expand all Collapse all v1 v1.9.14 Apr 27, 2020 v1.9.13 Apr 27, 2020 Changes in this version + type ExecQueue struct + func NewExecQueue(capacity int) *ExecQueue + func (q *ExecQueue) CanQueue() bool + func (q *ExecQueue) Clear() + func (q *ExecQueue) Queue(f func()) bool + func (q *ExecQueue) Quit() + type ExpirationFactor struct + Exp uint64 + Factor float64 + func ExpFactor(logOffset Fixed64) ExpirationFactor + func (e ExpirationFactor) Value(base float64, exp uint64) float64 + type ExpiredValue struct + Base uint64 + Exp uint64 + func (e *ExpiredValue) Add(amount int64, logOffset Fixed64) int64 + func (e *ExpiredValue) AddExp(a ExpiredValue) + func (e *ExpiredValue) SubExp(a ExpiredValue) + func (e ExpiredValue) Value(logOffset Fixed64) uint64 + type Expirer struct + func (e *Expirer) LogOffset(now mclock.AbsTime) Fixed64 + func (e *Expirer) SetLogOffset(now mclock.AbsTime, logOffset Fixed64) + func (e *Expirer) SetRate(now mclock.AbsTime, rate float64) + type Fixed64 int64 + func Float64ToFixed64(f float64) Fixed64 + func Uint64ToFixed64(f uint64) Fixed64 + func (f64 Fixed64) Fraction() Fixed64 + func (f64 Fixed64) Pow2() float64 + func (f64 Fixed64) ToUint64() uint64 + type WeightedRandomSelect struct + func NewWeightedRandomSelect() *WeightedRandomSelect + func (w *WeightedRandomSelect) Choose() wrsItem + func (w *WeightedRandomSelect) Remove(item wrsItem) + func (w *WeightedRandomSelect) Update(item wrsItem)