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.
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"`
QueueConfig QueueConfig `river:"queue_config,block,optional"`
}
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.
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 QueueConfig ¶ added in v0.38.0
type QueueConfig struct {
Capacity units.Base2Bytes `river:"capacity,attr,optional"`
DrainTimeout time.Duration `river:"drain_timeout,attr,optional"`
}
QueueConfig controls how the queue logs remote write client is configured. Note that this client is only used when the loki.write component has WAL support enabled.
func (*QueueConfig) SetToDefault ¶ added in v0.38.0
func (q *QueueConfig) SetToDefault()
SetToDefault implements river.Defaulter.
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"`
DrainTimeout time.Duration `river:"drain_timeout,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()