statsd

package
v0.0.0-...-79153e9 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReceiver

func NewReceiver(c Config) (slf.Receiver, error)

NewReceiver builds new StatsD receiver

func SanitizeParamValue

func SanitizeParamValue(value string) []byte

SanitizeParamValue replaces special characters from param value

Types

type Config

type Config struct {
	Address       string   `json:"address" yaml:"address"`
	Microseconds  bool     `json:"microseconds" yaml:"microseconds"`
	Dogstats      bool     `json:"dogstats" yaml:"dogstats"`
	AllowedParams []string `json:"params" yaml:"params"`
	Prefix        string   `json:"prefix" yaml:"prefix"`
	FlushEvery    int      `json:"flushEvery" yaml:"flushEvery"`
	PacketLines   int      `json:"packetLines" yaml:"packetLines"`
}

Config holds configuration for StatsD client

type PacketBuilder

type PacketBuilder interface {
	WriteEvent(e slf.Event)
	Size() int
	Bytes() []byte
}

PacketBuilder is special type of buffer, used to build StatsD-compatible packets.

func NewPacketBuilder

func NewPacketBuilder(prefix string, precision int64) PacketBuilder

NewPacketBuilder builds packet builder without params support

func NewPacketWithParamsBuilder

func NewPacketWithParamsBuilder(prefix string, precision int64, allowed map[string]bool) PacketBuilder

NewPacketWithParamsBuilder builds packet builder with params support

Jump to

Keyboard shortcuts

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