statsd

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Address: "localhost:8125",
	Prefix:  "styx",
}

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(prefix string, w io.Writer) (c *Client)

func (*Client) DecrCounter

func (c *Client) DecrCounter(name string, count int64) (err error)

DecrCounter a statsd counter

func (*Client) IncrCounter

func (c *Client) IncrCounter(name string, count int64) (err error)

IncrCounter a statsd counter

func (*Client) SetGauge

func (c *Client) SetGauge(name string, value int64) (err error)

Gauge send a tatsd gauge value

func (*Client) Time

func (c *Client) Time(name string, duration time.Duration) (err error)

Time send a statsd timing

type Config

type Config struct {
	Protocol string
	Address  string
	Prefix   string
}

type StatsdReporter

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

func NewStatsdReporter

func NewStatsdReporter(config Config) (sp *StatsdReporter, err error)

func (*StatsdReporter) Close

func (sp *StatsdReporter) Close() (err error)

func (*StatsdReporter) ReportLogStats

func (sp *StatsdReporter) ReportLogStats(name string, stats log.Stat) (err error)

type UDPConn

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

func NewUDPConn

func NewUDPConn(address string) (uc *UDPConn, err error)

func (*UDPConn) Close

func (uc *UDPConn) Close() (err error)

func (*UDPConn) Write

func (uc *UDPConn) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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