receiver

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCP

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

TCP receive metrics from TCP connections

func NewPickle

func NewPickle(out chan *points.Points) *TCP

NewPickle create new instance of TCP with pickle listener enabled

func NewTCP

func NewTCP(out chan *points.Points) *TCP

NewTCP create new instance of TCP

func (*TCP) Addr

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

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

func (*TCP) HandleConnection added in v0.8.0

func (rcv *TCP) HandleConnection(conn net.Conn)

func (*TCP) Listen

func (rcv *TCP) Listen(addr *net.TCPAddr) error

Listen bind port. Receive messages and send to out channel

func (*TCP) SetMaxPickleMessageSize added in v0.7.1

func (rcv *TCP) SetMaxPickleMessageSize(newSize uint32)

SetMaxPickleMessageSize sets maxPickleMessageSize (in bytes)

func (*TCP) Stat

func (rcv *TCP) Stat(send func(metric string, value float64))

type UDP

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

UDP receive metrics from UDP socket

func NewUDP

func NewUDP(out chan *points.Points) *UDP

NewUDP create new instance of UDP

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) SetLogIncomplete added in v0.5.0

func (rcv *UDP) SetLogIncomplete(value bool)

SetLogIncomplete enable or disable incomplete messages logging

func (*UDP) Stat

func (rcv *UDP) Stat(send func(metric string, value float64))

Jump to

Keyboard shortcuts

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