fileconsumer

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowHeaderMetadataParsing = featuregate.GlobalRegistry().MustRegister(
	"filelog.allowHeaderMetadataParsing",
	featuregate.StageBeta,
	featuregate.WithRegisterDescription("When enabled, allows usage of the `header` setting."),
	featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/18198"),
)

Functions

This section is empty.

Types

type Config

type Config struct {
	matcher.Criteria   `mapstructure:",squash"`
	attrs.Resolver     `mapstructure:",squash"`
	PollInterval       time.Duration   `mapstructure:"poll_interval,omitempty"`
	MaxConcurrentFiles int             `mapstructure:"max_concurrent_files,omitempty"`
	MaxBatches         int             `mapstructure:"max_batches,omitempty"`
	StartAt            string          `mapstructure:"start_at,omitempty"`
	FingerprintSize    helper.ByteSize `mapstructure:"fingerprint_size,omitempty"`
	MaxLogSize         helper.ByteSize `mapstructure:"max_log_size,omitempty"`
	Encoding           string          `mapstructure:"encoding,omitempty"`
	SplitConfig        split.Config    `mapstructure:"multiline,omitempty"`
	TrimConfig         trim.Config     `mapstructure:",squash,omitempty"`
	FlushPeriod        time.Duration   `mapstructure:"force_flush_period,omitempty"`
	Header             *HeaderConfig   `mapstructure:"header,omitempty"`
	DeleteAfterRead    bool            `mapstructure:"delete_after_read,omitempty"`
}

Config is the configuration of a file input operator

func NewConfig

func NewConfig() *Config

NewConfig creates a new input config with default values

func (Config) Build

func (c Config) Build(logger *zap.SugaredLogger, emit emit.Callback) (*Manager, error)

Build will build a file input operator from the supplied configuration

func (Config) BuildWithSplitFunc added in v0.65.0

func (c Config) BuildWithSplitFunc(logger *zap.SugaredLogger, emit emit.Callback, splitFunc bufio.SplitFunc) (*Manager, error)

BuildWithSplitFunc will build a file input operator with customized splitFunc function

type HeaderConfig added in v0.73.0

type HeaderConfig struct {
	Pattern           string            `mapstructure:"pattern"`
	MetadataOperators []operator.Config `mapstructure:"metadata_operators"`
}

type Manager added in v0.57.2

type Manager struct {
	*zap.SugaredLogger
	// contains filtered or unexported fields
}

func (*Manager) Start added in v0.57.2

func (m *Manager) Start(persister operator.Persister) error

func (*Manager) Stop added in v0.57.2

func (m *Manager) Stop() error

Stop will stop the file monitoring process

Jump to

Keyboard shortcuts

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