receiver

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.8.1

type Option func(Receiver) error

func BufferSize added in v0.9.0

func BufferSize(size int) Option

BufferSize creates option for New contructor

func Name added in v0.8.1

func Name(name string) Option

Name creates option for New contructor

func OutChan added in v0.8.1

func OutChan(ch chan *points.Points) Option

OutChan creates option for New contructor

func OutFunc added in v0.8.1

func OutFunc(out func(*points.Points)) Option

OutFunc creates option for New contructor

func PickleMaxMessageSize added in v0.8.1

func PickleMaxMessageSize(size uint32) Option

PickleMaxMessageSize creates option for New contructor

func UDPLogIncomplete added in v0.8.1

func UDPLogIncomplete(enable bool) Option

UDPLogIncomplete creates option for New contructor

type Receiver added in v0.8.1

type Receiver interface {
	Stop()
	Name() string
	Stat(helper.StatCallback)
}

func New added in v0.8.1

func New(dsn string, opts ...Option) (Receiver, error)

New creates udp, tcp, pickle receiver

type TCP

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

TCP receive metrics from TCP connections

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) Name added in v0.8.1

func (rcv *TCP) Name() string

Name returns receiver name (for store internal metrics)

func (*TCP) Stat

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

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) Name added in v0.8.1

func (rcv *UDP) Name() string

Name returns receiver name (for store internal metrics)

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