toplist

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Toplist

type Toplist struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(size int, decay time.Duration, bufferSize ...int) *Toplist

Initializes toplist with size (in entries), decay and buffer size(128*size if not defined, min 4*size)

func (*Toplist) Add

func (t *Toplist) Add(s string)

func (*Toplist) List

func (t *Toplist) List() (order []string, values map[string]float64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL