listener

package
v0.0.0-...-c4caace Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Launcher

type Launcher struct {
	// contains filtered or unexported fields
}

Launcher summons different protocol specific listeners based on configuration

func NewLauncher

func NewLauncher(sources *config.LogSources, frameSize int, pipelineProvider pipeline.Provider) *Launcher

NewLauncher returns an initialized Launcher

func (*Launcher) Start

func (l *Launcher) Start()

Start starts the listener.

func (*Launcher) Stop

func (l *Launcher) Stop()

Stop stops all listeners

type TCPListener

type TCPListener struct {
	// contains filtered or unexported fields
}

A TCPListener listens and accepts TCP connections and delegates the read operations to a tailer.

func NewTCPListener

func NewTCPListener(pipelineProvider pipeline.Provider, source *config.LogSource, frameSize int) *TCPListener

NewTCPListener returns an initialized TCPListener

func (*TCPListener) Start

func (l *TCPListener) Start()

Start starts the listener to accepts new incoming connections.

func (*TCPListener) Stop

func (l *TCPListener) Stop()

Stop stops the listener from accepting new connections and all the activer tailers.

type Tailer

type Tailer struct {
	// contains filtered or unexported fields
}

Tailer reads data from a connection

func NewTailer

func NewTailer(source *config.LogSource, conn net.Conn, outputChan chan *message.Message, read func(*Tailer) ([]byte, error)) *Tailer

NewTailer returns a new Tailer

func (*Tailer) Start

func (t *Tailer) Start()

Start prepares the tailer to read and decode data from the connection

func (*Tailer) Stop

func (t *Tailer) Stop()

Stop stops the tailer and waits for the decoder to be flushed

type UDPListener

type UDPListener struct {
	// contains filtered or unexported fields
}

A UDPListener opens a new UDP connection, keeps it alive and delegates the read operations to a tailer.

func NewUDPListener

func NewUDPListener(pipelineProvider pipeline.Provider, source *config.LogSource, frameSize int) *UDPListener

NewUDPListener returns an initialized UDPListener

func (*UDPListener) Start

func (l *UDPListener) Start()

Start opens a new UDP connection and starts a tailer.

func (*UDPListener) Stop

func (l *UDPListener) Stop()

Stop stops the tailer.

Jump to

Keyboard shortcuts

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