Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Placeholder to identify the first loopback device (usually lo or lo0, depending on platform) LoopbackAbbr = "_first_loopback_" // Device flags used to identify a loopback device LoopbackFlags = net.FlagLoopback | net.FlagUp )
View Source
const (
// DefaultStatsDPort is the default port the StatsD daemon listens on
DefaultStatsDPort = 8125
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // Listen begins reading metric datagrams off the network, sending the raw bytes to the data channel. This method // blocks until ctx is Done or an internal error arises. Listen(ctx context.Context) error // Chan returns the channel through which the raw datagrams will be returned. If the channel is closed, this stream // is no longer valid and a new one will need to be created. Chan() <-chan []byte }
Interface describes a stream source for stats metrics
func ResolveStream ¶
func ResolveStream(mode StreamMode, device string, port int) (stream Interface, err error)
type StreamMode ¶
type StreamMode uint8
const ( DefaultMode StreamMode = iota ListenMode CaptureMode )
Click to show internal directories.
Click to hide internal directories.