Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var UserAgent = fmt.Sprintf("Alloy/%s", version.Version)
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct { // TTL is how old a series can be. TTL time.Duration `alloy:"ttl,attr,optional"` Persistence Persistence `alloy:"persistence,block,optional"` Endpoints []EndpointConfig `alloy:"endpoint,block"` }
type BasicAuth ¶
type BasicAuth struct { Username string `alloy:"username,attr,optional"` Password alloytypes.Secret `alloy:"password,attr,optional"` }
type EndpointConfig ¶
type EndpointConfig struct { Name string `alloy:",label"` URL string `alloy:"url,attr"` BasicAuth *BasicAuth `alloy:"basic_auth,block,optional"` BearerToken alloytypes.Secret `alloy:"bearer_token,attr,optional"` Timeout time.Duration `alloy:"write_timeout,attr,optional"` // How long to wait between retries. RetryBackoff time.Duration `alloy:"retry_backoff,attr,optional"` // Maximum number of retries. MaxRetryAttempts uint `alloy:"max_retry_attempts,attr,optional"` // How many series to write at a time. BatchCount int `alloy:"batch_count,attr,optional"` // How long to wait before sending regardless of batch count. FlushInterval time.Duration `alloy:"flush_interval,attr,optional"` // How many concurrent queues to have. Parallelism ParallelismConfig `alloy:"parallelism,block,optional"` ExternalLabels map[string]string `alloy:"external_labels,attr,optional"` TLSConfig *TLSConfig `alloy:"tls_config,block,optional"` RoundRobin bool `alloy:"enable_round_robin,attr,optional"` // Headers specifies the HTTP headers to be added to all requests sent to the server. Headers map[string]alloytypes.Secret `alloy:"headers,attr,optional"` // ProxyURL is the URL of the HTTP proxy to use for requests. ProxyURL string `alloy:"proxy_url,attr,optional"` // ProxyFromEnvironment determines whether to read proxy configuration from environment // variables HTTP_PROXY, HTTPS_PROXY and NO_PROXY. ProxyFromEnvironment bool `alloy:"proxy_from_environment,attr,optional"` // ProxyConnectHeaders specify the headers to send to proxies during CONNECT requests. ProxyConnectHeaders map[string]alloytypes.Secret `alloy:"proxy_connect_headers,attr,optional"` }
EndpointConfig is the alloy specific version of ConnectionConfig.
func (*EndpointConfig) SetToDefault ¶
func (cc *EndpointConfig) SetToDefault()
func (EndpointConfig) ToNativeType ¶
func (cc EndpointConfig) ToNativeType() types.ConnectionConfig
type Exports ¶
type Exports struct {
Receiver storage.Appendable `alloy:"receiver,attr"`
}
type ParallelismConfig ¶ added in v1.7.0
type ParallelismConfig struct { DriftScaleUp time.Duration `alloy:"drift_scale_up,attr,optional"` DriftScaleDown time.Duration `alloy:"drift_scale_down,attr,optional"` MaxConnections uint `alloy:"max_connections,attr,optional"` MinConnections uint `alloy:"min_connections,attr,optional"` NetworkFlushInterval time.Duration `alloy:"network_flush_interval,attr,optional"` DesiredConnectionsLookback time.Duration `alloy:"desired_connections_lookback,attr,optional"` DesiredCheckInterval time.Duration `alloy:"desired_check_interval,attr,optional"` AllowedNetworkErrorFraction float64 `alloy:"allowed_network_error_fraction,attr,optional"` }
type Persistence ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is a queue based WAL used to send data to a remote_write endpoint. Queue supports replaying and TTLs.
func (*Queue) Appender ¶
Appender returns a new appender for the storage. The implementation can choose whether or not to use the context, for deadlines or to check for errors.
func (*Queue) Run ¶
Run starts the component, blocking until ctx is canceled or the component suffers a fatal error. Run is guaranteed to be called exactly once per Component.
func (*Queue) Update ¶
Update provides a new Config to the component. The type of newConfig will always match the struct type which the component registers.
Update will be called concurrently with Run. The component must be able to gracefully handle updating its config while still running.
An error may be returned if the provided config is invalid.