state

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct{}

Log struct is State interface implementation that writes all states to log

func (*Log) Set

func (s *Log) Set(metric string, n int)

Set sets metric state

type Memory

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

Memory struct is State interface implementation that stores results in memory for further usage

func NewMemory

func NewMemory() *Memory

NewMemory builds and returns new Memory instance

func (*Memory) Metrics

func (i *Memory) Metrics() map[string]int

Metrics returns all previously stored metrics

func (*Memory) Set

func (i *Memory) Set(metric string, n int)

Set sets metric state

type State

type State interface {
	// Set sets metric state
	Set(metric string, n int)
}

State is a metric state interface

func New

func New(c *statsd.Client, muted bool) State

New builds and returns new State instance

type Statsd

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

Statsd struct is State interface implementation that writes all states to statsd gauge

func (*Statsd) Set

func (s *Statsd) Set(metric string, n int)

Set sets metric state

Jump to

Keyboard shortcuts

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