listener

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser added in v0.19.0

type Parser interface {
	LineToEvents(line string, sampleErrors prometheus.CounterVec, samplesReceived prometheus.Counter, tagErrors prometheus.Counter, tagsReceived prometheus.Counter, logger *slog.Logger) event.Events
}

type StatsDTCPListener

type StatsDTCPListener struct {
	Conn            *net.TCPListener
	EventHandler    event.EventHandler
	Logger          *slog.Logger
	LineParser      Parser
	LinesReceived   prometheus.Counter
	EventsFlushed   prometheus.Counter
	Relay           *relay.Relay
	SampleErrors    prometheus.CounterVec
	SamplesReceived prometheus.Counter
	TagErrors       prometheus.Counter
	TagsReceived    prometheus.Counter
	TCPConnections  prometheus.Counter
	TCPErrors       prometheus.Counter
	TCPLineTooLong  prometheus.Counter
}

func (*StatsDTCPListener) HandleConn

func (l *StatsDTCPListener) HandleConn(c *net.TCPConn)

func (*StatsDTCPListener) Listen

func (l *StatsDTCPListener) Listen()

func (*StatsDTCPListener) SetEventHandler

func (l *StatsDTCPListener) SetEventHandler(eh event.EventHandler)

type StatsDUDPListener

type StatsDUDPListener struct {
	Conn            *net.UDPConn
	EventHandler    event.EventHandler
	Logger          *slog.Logger
	LineParser      Parser
	UDPPackets      prometheus.Counter
	UDPPacketDrops  prometheus.Counter
	LinesReceived   prometheus.Counter
	EventsFlushed   prometheus.Counter
	Relay           *relay.Relay
	SampleErrors    prometheus.CounterVec
	SamplesReceived prometheus.Counter
	TagErrors       prometheus.Counter
	TagsReceived    prometheus.Counter
	UdpPacketQueue  chan []byte
}

func (*StatsDUDPListener) EnqueueUdpPacket added in v0.25.0

func (l *StatsDUDPListener) EnqueueUdpPacket(packet []byte, n int)

func (*StatsDUDPListener) HandlePacket

func (l *StatsDUDPListener) HandlePacket(packet []byte)

func (*StatsDUDPListener) Listen

func (l *StatsDUDPListener) Listen()

func (*StatsDUDPListener) ProcessUdpPacketQueue added in v0.25.0

func (l *StatsDUDPListener) ProcessUdpPacketQueue()

func (*StatsDUDPListener) SetEventHandler

func (l *StatsDUDPListener) SetEventHandler(eh event.EventHandler)

type StatsDUnixgramListener

type StatsDUnixgramListener struct {
	Conn            *net.UnixConn
	EventHandler    event.EventHandler
	Logger          *slog.Logger
	LineParser      Parser
	UnixgramPackets prometheus.Counter
	LinesReceived   prometheus.Counter
	EventsFlushed   prometheus.Counter
	Relay           *relay.Relay
	SampleErrors    prometheus.CounterVec
	SamplesReceived prometheus.Counter
	TagErrors       prometheus.Counter
	TagsReceived    prometheus.Counter
}

func (*StatsDUnixgramListener) HandlePacket

func (l *StatsDUnixgramListener) HandlePacket(packet []byte)

func (*StatsDUnixgramListener) Listen

func (l *StatsDUnixgramListener) Listen()

func (*StatsDUnixgramListener) SetEventHandler

func (l *StatsDUnixgramListener) SetEventHandler(eh event.EventHandler)

Jump to

Keyboard shortcuts

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