Documentation
¶
Index ¶
- type AuthConfiguration
- type Configuration
- type Data
- type DroppedEntry
- type Entry
- type LokiQuery
- type Source
- func (*Source) CanRun() error
- func (l *Source) Configure(_ context.Context, config []byte, logger *log.Entry, ...) error
- func (l *Source) ConfigureByDSN(_ context.Context, dsn string, labels map[string]string, logger *log.Entry, ...) error
- func (l *Source) Dump() any
- func (*Source) GetAggregMetrics() []prometheus.Collector
- func (*Source) GetMetrics() []prometheus.Collector
- func (l *Source) GetMode() string
- func (*Source) GetName() string
- func (l *Source) GetUuid() string
- func (l *Source) OneShotAcquisition(ctx context.Context, out chan pipeline.Event, t *tomb.Tomb) error
- func (l *Source) StreamingAcquisition(ctx context.Context, out chan pipeline.Event, t *tomb.Tomb) error
- func (l *Source) UnmarshalConfig(yamlConfig []byte) error
- type Stream
- type StreamResult
- type Tail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfiguration ¶ added in v1.7.4
type Configuration ¶ added in v1.7.4
type Configuration struct {
URL string `yaml:"url"` // Loki url
Prefix string `yaml:"prefix"` // Loki prefix
Query string `yaml:"query"` // LogQL query
Limit int `yaml:"limit"` // Limit of logs to read
DelayFor time.Duration `yaml:"delay_for"`
Since time.Duration `yaml:"since"`
Headers map[string]string `yaml:"headers"` // HTTP headers for talking to Loki
WaitForReady time.Duration `yaml:"wait_for_ready"` // Retry interval, default is 10 seconds
Auth AuthConfiguration `yaml:"auth"`
MaxFailureDuration time.Duration `yaml:"max_failure_duration"` // Max duration of failure before stopping the source
NoReadyCheck bool `yaml:"no_ready_check"` // Bypass /ready check before starting
configuration.DataSourceCommonCfg `yaml:",inline"`
}
type Data ¶
type Data struct {
ResultType string `json:"resultType"`
Result []StreamResult `json:"result"` // Warning, just stream value is handled
Stats any `json:"stats"` // Stats is boring, just ignore it
}
type DroppedEntry ¶
type Entry ¶
func (*Entry) UnmarshalJSON ¶
type LokiQuery ¶
LokiQuery GET response. See https://grafana.com/docs/loki/latest/api/#get-lokiapiv1query
type Source ¶ added in v1.7.4
type Source struct {
Config Configuration
Client *lokiclient.LokiClient
// contains filtered or unexported fields
}
func (*Source) ConfigureByDSN ¶ added in v1.7.4
func (*Source) GetAggregMetrics ¶ added in v1.7.4
func (*Source) GetAggregMetrics() []prometheus.Collector
func (*Source) GetMetrics ¶ added in v1.7.4
func (*Source) GetMetrics() []prometheus.Collector
func (*Source) OneShotAcquisition ¶ added in v1.7.4
func (l *Source) OneShotAcquisition(ctx context.Context, out chan pipeline.Event, t *tomb.Tomb) error
OneShotAcquisition reads a set of file and returns when done
func (*Source) StreamingAcquisition ¶ added in v1.7.4
func (*Source) UnmarshalConfig ¶ added in v1.7.4
type StreamResult ¶
type Tail ¶
type Tail struct {
Streams []Stream `json:"streams"`
DroppedEntries []DroppedEntry `json:"dropped_entries"`
}
Click to show internal directories.
Click to hide internal directories.