metric

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTickerFunc

func AddTickerFunc(f TickerFunc)

AddTickerFunc adds a new function callback to the list of metrics TickerFuncs that get called each minute.

func Push

func Push(history *list.List, ev expvar.Var) string

Push adds the metric to the end of the list and returns a comma separated string of the previous 61 entries. We return 61 instead of 60 (an hour) because the chart on the client tracks deltas between these values - there is nothing to compare the first value against.

Types

type TickerFunc

type TickerFunc func()

TickerFunc is the function signature accepted by AddTickerFunc, will be called once per minute.

Jump to

Keyboard shortcuts

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