udp

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Maximum UDP packet size
	MaxUDPSize = 64 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig added in v0.53.0

type BaseConfig struct {
	ListenAddress string                 `mapstructure:"listen_address,omitempty"        json:"listen_address,omitempty"       yaml:"listen_address,omitempty"`
	AddAttributes bool                   `mapstructure:"add_attributes,omitempty"        json:"add_attributes,omitempty"       yaml:"add_attributes,omitempty"`
	Encoding      helper.EncodingConfig  `mapstructure:",squash,omitempty"               json:",inline,omitempty"              yaml:",inline,omitempty"`
	Multiline     helper.MultilineConfig `mapstructure:"multiline,omitempty"             json:"multiline,omitempty"            yaml:"multiline,omitempty"`
}

BaseConfig is the details configuration of a udp input operator.

type Config added in v0.53.0

type Config struct {
	helper.InputConfig `yaml:",inline"`
	BaseConfig         `yaml:",inline"`
}

Config is the configuration of a udp input operator.

func NewConfig added in v0.53.0

func NewConfig(operatorID string) *Config

NewConfig creates a new UDP input config with default values

func (Config) Build added in v0.53.0

func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error)

Build will build a udp input operator.

type Input added in v0.53.0

type Input struct {
	helper.InputOperator
	// contains filtered or unexported fields
}

Input is an operator that listens to a socket for log entries.

func (*Input) Start added in v0.53.0

func (u *Input) Start(persister operator.Persister) error

Start will start listening for messages on a socket.

func (*Input) Stop added in v0.53.0

func (u *Input) Stop() error

Stop will stop listening for udp messages.

Jump to

Keyboard shortcuts

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