file

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	Targets              []discovery.Target   `alloy:"targets,attr"`
	ForwardTo            []loki.LogsReceiver  `alloy:"forward_to,attr"`
	Encoding             string               `alloy:"encoding,attr,optional"`
	DecompressionConfig  DecompressionConfig  `alloy:"decompression,block,optional"`
	FileWatch            FileWatch            `alloy:"file_watch,block,optional"`
	FileMatch            FileMatch            `alloy:"file_match,block,optional"`
	TailFromEnd          bool                 `alloy:"tail_from_end,attr,optional"`
	LegacyPositionsFile  string               `alloy:"legacy_positions_file,attr,optional"`
	OnPositionsFileError OnPositionsFileError `alloy:"on_positions_file_error,attr,optional"`
}

Arguments holds values which are used to configure the loki.source.file component.

func (*Arguments) SetToDefault

func (a *Arguments) SetToDefault()

func (*Arguments) Validate added in v1.12.0

func (a *Arguments) Validate() error

type Component

type Component struct {
	// contains filtered or unexported fields
}

Component implements the loki.source.file component.

func New

func New(o component.Options, args Arguments) (*Component, error)

New creates a new loki.source.file component.

func (*Component) DebugInfo

func (c *Component) DebugInfo() any

DebugInfo returns information about the status of tailed targets. TODO(@tpaschalis) Decorate with more debug information once it's made available, such as the last time a log line was read.

func (*Component) IsStopping added in v1.7.0

func (c *Component) IsStopping() bool

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

Run implements component.Component.

func (*Component) Update

func (c *Component) Update(args component.Arguments) error

Update implements component.Component.

type CompressionFormat

type CompressionFormat string

func (CompressionFormat) MarshalText

func (ut CompressionFormat) MarshalText() (text []byte, err error)

MarshalText implements encoding.TextMarshaler.

func (CompressionFormat) String

func (ut CompressionFormat) String() string

func (*CompressionFormat) UnmarshalText

func (ut *CompressionFormat) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type DecompressionConfig

type DecompressionConfig struct {
	Enabled      bool              `alloy:"enabled,attr"`
	InitialDelay time.Duration     `alloy:"initial_delay,attr,optional"`
	Format       CompressionFormat `alloy:"format,attr"`
}

func (DecompressionConfig) GetFormat added in v1.13.0

func (d DecompressionConfig) GetFormat() string

type FileMatch added in v1.12.0

type FileMatch struct {
	Enabled         bool          `alloy:"enabled,attr,optional"`
	SyncPeriod      time.Duration `alloy:"sync_period,attr,optional"`
	IgnoreOlderThan time.Duration `alloy:"ignore_older_than,attr,optional"`
}

func (*FileMatch) SetToDefault added in v1.12.0

func (a *FileMatch) SetToDefault()

func (*FileMatch) Validate added in v1.12.0

func (a *FileMatch) Validate() error

type FileWatch

type FileWatch struct {
	MinPollFrequency time.Duration `alloy:"min_poll_frequency,attr,optional"`
	MaxPollFrequency time.Duration `alloy:"max_poll_frequency,attr,optional"`
}

func (*FileWatch) SetToDefault added in v1.12.0

func (a *FileWatch) SetToDefault()

type OnPositionsFileError added in v1.12.0

type OnPositionsFileError string
const (
	OnPositionsFileErrorSkip             OnPositionsFileError = "skip"
	OnPositionsFileErrorRestartEnd       OnPositionsFileError = "restart_from_end"
	OnPositionsFileErrorRestartBeginning OnPositionsFileError = "restart_from_beginning"
)

func (OnPositionsFileError) MarshalText added in v1.12.0

func (o OnPositionsFileError) MarshalText() ([]byte, error)

func (*OnPositionsFileError) UnmarshalText added in v1.12.0

func (o *OnPositionsFileError) UnmarshalText(text []byte) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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