udp

package
v0.0.0-...-35869c8 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2016 License: Unlicense Imports: 7 Imported by: 6

Documentation

Index

Constants

View Source
const (
	MaxUdpPacketSize = 65535
)

Variables

This section is empty.

Functions

func Listener

func Listener(listen_addr, prefix_internal string, output *common.Output, parse parseLineFunc)

Listener receives packets from the udp buffer, parses them and feeds both the Metrics channel as well as the metricAmounts channel

func ParseLine

func ParseLine(line []byte) (metric *common.Metric, err error)

ParseLine turns a line into a *Metric (or not) and returns an error if the line was invalid. note that *Metric can be nil when the line was valid (if the line was empty) input format: key:value|modifier[|@samplerate]

func ParseLine2

func ParseLine2(line []byte) (*common.Metric, error)

ParseLine with lexer impl

func ParseMessage

func ParseMessage(data []byte, prefix_internal string, output *common.Output, parse parseLineFunc) (metrics []*common.Metric)

ParseMessage turns byte data into a slice of metric pointers note that it creates "invalid line" metrics itself, upon invalid lines, which will get passed on and aggregated along with the other metrics

func StatsListener

func StatsListener(listen_addr, prefix_internal string, output *common.Output)

Types

This section is empty.

Jump to

Keyboard shortcuts

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