write

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 18 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 {
	Endpoints      []EndpointOptions `river:"endpoint,block,optional"`
	ExternalLabels map[string]string `river:"external_labels,attr,optional"`
	MaxStreams     int               `river:"max_streams,attr,optional"`
	WAL            WalArguments      `river:"wal,block,optional"`
}

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

type Component

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

Component implements the loki.write component.

func New

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

New creates a new loki.write component.

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 EndpointOptions

type EndpointOptions struct {
	Name              string                  `river:"name,attr,optional"`
	URL               string                  `river:"url,attr"`
	BatchWait         time.Duration           `river:"batch_wait,attr,optional"`
	BatchSize         units.Base2Bytes        `river:"batch_size,attr,optional"`
	RemoteTimeout     time.Duration           `river:"remote_timeout,attr,optional"`
	Headers           map[string]string       `river:"headers,attr,optional"`
	MinBackoff        time.Duration           `river:"min_backoff_period,attr,optional"`  // start backoff at this level
	MaxBackoff        time.Duration           `river:"max_backoff_period,attr,optional"`  // increase exponentially to this level
	MaxBackoffRetries int                     `river:"max_backoff_retries,attr,optional"` // give up after this many; zero means infinite retries
	TenantID          string                  `river:"tenant_id,attr,optional"`
	RetryOnHTTP429    bool                    `river:"retry_on_http_429,attr,optional"`
	HTTPClientConfig  *types.HTTPClientConfig `river:",squash"`
}

EndpointOptions describes an individual location to send logs to.

func GetDefaultEndpointOptions added in v0.32.0

func GetDefaultEndpointOptions() EndpointOptions

GetDefaultEndpointOptions defines the default settings for sending logs to a remote endpoint. The backoff schedule with the default parameters: 0.5s, 1s, 2s, 4s, 8s, 16s, 32s, 64s, 128s, 256s(4.267m) For a total time of 511.5s (8.5m) before logs are lost.

func (*EndpointOptions) SetToDefault added in v0.35.0

func (r *EndpointOptions) SetToDefault()

SetToDefault implements river.Defaulter.

func (*EndpointOptions) Validate added in v0.35.0

func (r *EndpointOptions) Validate() error

Validate implements river.Validator.

type Exports

type Exports struct {
	Receiver loki.LogsReceiver `river:"receiver,attr"`
}

Exports holds the receiver that is used to send log entries to the loki.write component.

type WalArguments added in v0.36.0

type WalArguments struct {
	Enabled          bool          `river:"enabled,attr,optional"`
	MaxSegmentAge    time.Duration `river:"max_segment_age,attr,optional"`
	MinReadFrequency time.Duration `river:"min_read_frequency,attr,optional"`
	MaxReadFrequency time.Duration `river:"max_read_frequency,attr,optional"`
}

WalArguments holds the settings for configuring the Write-Ahead Log (WAL) used by the underlying remote write client.

func (*WalArguments) SetToDefault added in v0.36.0

func (wa *WalArguments) SetToDefault()

func (*WalArguments) Validate added in v0.36.0

func (wa *WalArguments) Validate() error

Jump to

Keyboard shortcuts

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