stats – github.com/manucorporat/stats Index | Files

package stats

import "github.com/manucorporat/stats"

Index

Functions

func Del

func Del(key string)

func Reset

func Reset()

func Set

func Set(key string, value ValueType)

Types

type StatsCollector

type StatsCollector struct {
	// contains filtered or unexported fields
}

func New

func New() *StatsCollector

func (*StatsCollector) Add

func (s *StatsCollector) Add(key string, delta ValueType) (v ValueType)

func (*StatsCollector) Data

func (s *StatsCollector) Data() StatsType

func (*StatsCollector) Del

func (s *StatsCollector) Del(key string)

func (*StatsCollector) Get

func (s *StatsCollector) Get(key string) (v ValueType)

func (*StatsCollector) Reset

func (s *StatsCollector) Reset()

func (*StatsCollector) Set

func (s *StatsCollector) Set(key string, value ValueType)

type StatsType

type StatsType map[string]ValueType

func Data

func Data() StatsType

type ValueType

type ValueType float64

func Add

func Add(key string, delta ValueType) ValueType

func Get

func Get(key string) ValueType

Source Files

stats.go

Version
v0.0.0-20180402194714-3ba42d56d227 (latest)
Published
Apr 2, 2018
Platform
js/wasm
Imports
1 packages
Last checked
now

Tools for package owners.