file

package
v0.40.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	FileWatch: FileWatch{
		MinPollFrequency: 250 * time.Millisecond,
		MaxPollFrequency: 250 * time.Millisecond,
	},
}

Functions

This section is empty.

Types

type Arguments

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

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

func (*Arguments) SetToDefault added in v0.37.0

func (a *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

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() interface{}

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) Run

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

Run implements component.Component. TODO(@tpaschalis). Should we periodically re-check? What happens if a target comes alive _after_ it's been passed to us and we never receive another Update()? Or should it be a responsibility of the discovery component?

func (*Component) Update

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

Update implements component.Component.

type CompressionFormat added in v0.36.0

type CompressionFormat string

func (CompressionFormat) MarshalText added in v0.36.0

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

MarshalText implements encoding.TextMarshaler.

func (CompressionFormat) String added in v0.36.0

func (ut CompressionFormat) String() string

func (*CompressionFormat) UnmarshalText added in v0.36.0

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

UnmarshalText implements encoding.TextUnmarshaler.

type DecompressionConfig added in v0.36.0

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

type FileWatch added in v0.37.0

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

Jump to

Keyboard shortcuts

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