tcp

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (

	// DefaultMaxLogSize is the max buffer sized used
	// if MaxLogSize is not set
	DefaultMaxLogSize = 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig added in v0.53.0

type BaseConfig struct {
	MaxLogSize                  helper.ByteSize             `mapstructure:"max_log_size,omitempty"`
	ListenAddress               string                      `mapstructure:"listen_address,omitempty"`
	TLS                         *configtls.TLSServerSetting `mapstructure:"tls,omitempty"`
	AddAttributes               bool                        `mapstructure:"add_attributes,omitempty"`
	OneLogPerPacket             bool                        `mapstructure:"one_log_per_packet,omitempty"`
	Encoding                    helper.EncodingConfig       `mapstructure:",squash,omitempty"`
	Multiline                   helper.MultilineConfig      `mapstructure:"multiline,omitempty"`
	PreserveLeadingWhitespaces  bool                        `mapstructure:"preserve_leading_whitespaces,omitempty"`
	PreserveTrailingWhitespaces bool                        `mapstructure:"preserve_trailing_whitespaces,omitempty"`
	MultiLineBuilder            MultiLineBuilderFunc
}

BaseConfig is the detailed configuration of a tcp input operator.

type Config added in v0.53.0

type Config struct {
	helper.InputConfig `mapstructure:",squash"`
	BaseConfig         `mapstructure:",squash"`
}

Config is the configuration of a tcp input operator.

func NewConfig added in v0.53.0

func NewConfig() *Config

NewConfig creates a new TCP input config with default values

func NewConfigWithID added in v0.59.0

func NewConfigWithID(operatorID string) *Config

NewConfigWithID creates a new TCP 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 tcp input operator.

type Input added in v0.53.0

type Input struct {
	helper.InputOperator

	MaxLogSize int

	OneLogPerPacket bool
	// contains filtered or unexported fields
}

Input is an operator that listens for log entries over tcp.

func (*Input) Start added in v0.53.0

func (t *Input) Start(_ operator.Persister) error

Start will start listening for log entries over tcp.

func (*Input) Stop added in v0.53.0

func (t *Input) Stop() error

Stop will stop listening for log entries over TCP.

type MultiLineBuilderFunc added in v0.81.0

type MultiLineBuilderFunc func(enc encoding.Encoding) (bufio.SplitFunc, error)

Jump to

Keyboard shortcuts

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