Documentation ¶
Overview ¶
Package kubernetes implements the loki.source.kubernetes component.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultArguments = Arguments{ Client: ClientArguments{ HTTPClientConfig: config.DefaultHTTPClientConfig, }, }
DefaultArguments holds default settings for loki.source.kubernetes.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct { Targets []discovery.Target `river:"targets,attr"` ForwardTo []loki.LogsReceiver `river:"forward_to,attr"` // Client settings to connect to Kubernetes. Client ClientArguments `river:"client,block,optional"` }
Arguments holds values which are used to configure the loki.source.kubernetes component.
func (*Arguments) UnmarshalRiver ¶
UnmarshalRiver implements river.Unmarshaler and applies defaults.
type ClientArguments ¶
type ClientArguments struct { APIServer config.URL `river:"api_server,attr,optional"` KubeConfig string `river:"kubeconfig_file,attr,optional"` HTTPClientConfig config.HTTPClientConfig `river:",squash"` }
ClientArguments controls how loki.source.kubernetes connects to Kubernetes.
func (*ClientArguments) BuildRESTConfig ¶
BuildRESTConfig converts ClientArguments to a Kubernetes REST config.
func (*ClientArguments) UnmarshalRiver ¶
func (args *ClientArguments) UnmarshalRiver(f func(interface{}) error) error
UnmarshalRiver unmarshals ClientArguments and performs validations.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component implements the loki.source.kubernetes component.
func (*Component) DebugInfo ¶
func (c *Component) DebugInfo() interface{}
DebugInfo returns debug information for loki.source.kubernetes.
type DebugInfo ¶
type DebugInfo struct {
Targets []DebugInfoTarget `river:"target,block,optional"`
}
DebugInfo represents debug information for loki.source.kubernets.
type DebugInfoTarget ¶
type DebugInfoTarget struct { Labels map[string]string `river:"labels,attr,optional"` DiscoveryLabels map[string]string `river:"discovery_labels,attr,optional"` LastError string `river:"last_error,attr,optional"` UpdateTime time.Time `river:"update_time,attr,optional"` }
DebugInfoTarget is debug information for an individual target being tailed for logs.