tcp

package
v0.14.1-0...-915d78e Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FramingOptions

type FramingOptions struct {
	Listen         string `toml:"listen"`
	MaxMessageSize uint32 `toml:"max-message-size"`
	Enabled        bool   `toml:"enabled"`
	BufferSize     int    `toml:"buffer-size"`
}

func NewFramingOptions

func NewFramingOptions() *FramingOptions

type Options

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

func NewOptions

func NewOptions() *Options

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

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

func (*TCP) InitPrometheus

func (rcv *TCP) InitPrometheus(reg prometheus.Registerer)

func (*TCP) Listen

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

Listen bind port. Receive messages and send to out channel

func (*TCP) Stat

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

Jump to

Keyboard shortcuts

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