statsd

package
Version: v0.0.0-...-403286f Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

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

func NewAggregator

func NewAggregator(t dataPointQueuer, prefix string) *Aggregator

func (*Aggregator) Flush

func (a *Aggregator) Flush()

func (*Aggregator) Process

func (a *Aggregator) Process(st *Stat) error

type Stat

type Stat struct {
	Name   string
	Value  float64
	Metric string
	Sample float64
	Hops   int
}

func ParseStatsdPacket

func ParseStatsdPacket(packet string) (*Stat, error)

ParseStatsdPacket parses a statsd packet e.g: gorets:1|c|@0.1. See https://github.com/etsy/statsd/blob/master/docs/metric_types.md There is no need to support multi-metric packets here, since it uses newline as separator, the text handler in daemon/services.go would take care of it.

func (*Stat) GobDecode

func (st *Stat) GobDecode(b []byte) error

func (*Stat) GobEncode

func (st *Stat) GobEncode() ([]byte, error)

TODO Why do we need these if all the members are public base types?

Source Files

Jump to

Keyboard shortcuts

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