fileconsumer

package
v0.84.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 25 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"`
	IncludeFileName         bool                    `mapstructure:"include_file_name,omitempty"`
	IncludeFilePath         bool                    `mapstructure:"include_file_path,omitempty"`
	IncludeFileNameResolved bool                    `mapstructure:"include_file_name_resolved,omitempty"`
	IncludeFilePathResolved bool                    `mapstructure:"include_file_path_resolved,omitempty"`
	PollInterval            time.Duration           `mapstructure:"poll_interval,omitempty"`
	StartAt                 string                  `mapstructure:"start_at,omitempty"`
	FingerprintSize         helper.ByteSize         `mapstructure:"fingerprint_size,omitempty"`
	MaxLogSize              helper.ByteSize         `mapstructure:"max_log_size,omitempty"`
	MaxConcurrentFiles      int                     `mapstructure:"max_concurrent_files,omitempty"`
	MaxBatches              int                     `mapstructure:"max_batches,omitempty"`
	DeleteAfterRead         bool                    `mapstructure:"delete_after_read,omitempty"`
	Splitter                tokenize.SplitterConfig `mapstructure:",squash,omitempty"`
	Header                  *HeaderConfig           `mapstructure:"header,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

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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