Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionHandler ¶
type ConnectionHandler struct {
// contains filtered or unexported fields
}
ConnectionHandler creates a worker for each new connection and releases the ones that must be stopped
func NewConnectionHandler ¶
func NewConnectionHandler(pp pipeline.Provider, source *config.LogSource) *ConnectionHandler
NewConnectionHandler returns a new ConnectionHandler
func (*ConnectionHandler) HandleConnection ¶
func (h *ConnectionHandler) HandleConnection(conn net.Conn)
HandleConnection forwards the new connection to connChan
func (*ConnectionHandler) Stop ¶
func (h *ConnectionHandler) Stop()
Stop stops all the workers in parallel, this call returns only when connChan is flushed and all workers are stopped
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener summons different protocol specific listeners based on configuration
type TCPListener ¶
type TCPListener struct {
// contains filtered or unexported fields
}
A TCPListener listens and accepts TCP connections and delegates the work to connHandler
func NewTCPListener ¶
NewTCPListener returns an initialized TCPListener
func (*TCPListener) Start ¶
func (l *TCPListener) Start()
Start listens to TCP connections on another routine
func (*TCPListener) Stop ¶
func (l *TCPListener) Stop()
Stop prevents the listener to accept new incoming connections it blocks until connHandler is flushed
type UDPListener ¶
type UDPListener struct {
// contains filtered or unexported fields
}
A UDPListener listens for UDP connections and delegates the work to connHandler
func NewUDPListener ¶
NewUDPListener returns an initialized UDPListener
func (*UDPListener) Start ¶
func (l *UDPListener) Start()
Start listens to UDP connections on another routine
func (*UDPListener) Stop ¶
func (l *UDPListener) Stop()
Stop closes the UDP connection it blocks until connHandler is flushed