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"`
}
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"`
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"`
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) UnmarshalRiver ¶
func (r *EndpointOptions) UnmarshalRiver(f func(v interface{}) error) error
UnmarshalRiver implements river.Unmarshaler.
Click to show internal directories.
Click to hide internal directories.