tcp

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 1

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 TCPBaseConfig

type TCPBaseConfig struct {
	MaxLogSize    helper.ByteSize         `mapstructure:"max_log_size,omitempty"          json:"max_log_size,omitempty"         yaml:"max_log_size,omitempty"`
	ListenAddress string                  `mapstructure:"listen_address,omitempty"        json:"listen_address,omitempty"       yaml:"listen_address,omitempty"`
	TLS           *helper.TLSServerConfig `mapstructure:"tls,omitempty"                   json:"tls,omitempty"                  yaml:"tls,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"`
}

TCPBaseConfig is the detailed configuration of a tcp input operator.

type TCPInput

type TCPInput struct {
	helper.InputOperator

	MaxLogSize int
	// contains filtered or unexported fields
}

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

func (*TCPInput) Start

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

Start will start listening for log entries over tcp.

func (*TCPInput) Stop

func (t *TCPInput) Stop() error

Stop will stop listening for log entries over TCP.

type TCPInputConfig

type TCPInputConfig struct {
	helper.InputConfig `yaml:",inline"`
	TCPBaseConfig      `yaml:",inline"`
}

TCPInputConfig is the configuration of a tcp input operator.

func NewTCPInputConfig

func NewTCPInputConfig(operatorID string) *TCPInputConfig

NewTCPInputConfig creates a new TCP input config with default values

func (TCPInputConfig) Build

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

Build will build a tcp input operator.

Jump to

Keyboard shortcuts

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