udp

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Listen        string `toml:"listen"`
	Enabled       bool   `toml:"enabled"`
	LogIncomplete bool   `toml:"log-incomplete"`
	BufferSize    int    `toml:"buffer-size"`
}

func NewOptions

func NewOptions() *Options

type UDP

type UDP struct {
	helper.Stoppable
	// contains filtered or unexported fields
}

UDP receive metrics from UDP socket

func (*UDP) Addr

func (rcv *UDP) Addr() net.Addr

Addr returns binded socket address. For bind port 0 in tests

func (*UDP) Listen

func (rcv *UDP) Listen(addr *net.UDPAddr) error

Listen bind port. Receive messages and send to out channel

func (*UDP) Stat

func (rcv *UDP) Stat(send helper.StatCallback)

Jump to

Keyboard shortcuts

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