Documentation ¶
Index ¶
Constants ¶
View Source
const LOOKUP_TABLE = 256
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeavyKeeper ¶
type HeavyKeeper struct {
// contains filtered or unexported fields
}
Topk implement by heavykeeper algorithm.
func (*HeavyKeeper) Add ¶
func (topk *HeavyKeeper) Add(key string, incr uint32) (string, bool)
Add add item into heavykeeper and return if item had beend add into minheap. if item had been add into minheap and some item was expelled, return the expelled item.
func (*HeavyKeeper) Expelled ¶
func (topk *HeavyKeeper) Expelled() <-chan Item
func (*HeavyKeeper) Fading ¶
func (topk *HeavyKeeper) Fading()
func (*HeavyKeeper) List ¶
func (topk *HeavyKeeper) List() []Item
func (*HeavyKeeper) Total ¶
func (topk *HeavyKeeper) Total() uint64
Click to show internal directories.
Click to hide internal directories.