Documentation
¶
Index ¶
- Constants
- type Entry
- type Loader
- type QueryRangeInput
- type QueryRangeResult
- type RealLoader
- func (l *RealLoader) LabelNames(ctx context.Context, start, end time.Time) ([]string, error)
- func (l *RealLoader) LabelValues(ctx context.Context, label string, start, end time.Time) ([]string, error)
- func (l *RealLoader) QueryRange(ctx context.Context, input QueryRangeInput) (QueryRangeResult, error)
- type Stream
Constants ¶
View Source
const (
RequestTimeout = 60 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader interface {
LabelNames(ctx context.Context, start, end time.Time) ([]string, error)
LabelValues(ctx context.Context, label string, start, end time.Time) ([]string, error)
QueryRange(ctx context.Context, input QueryRangeInput) (QueryRangeResult, error)
}
Loader defines the interface for querying Loki.
type QueryRangeInput ¶
type QueryRangeInput struct {
Query string
Start time.Time
End time.Time
Limit int
Direction string
}
QueryRangeInput is the query payload for Loki /query_range.
type QueryRangeResult ¶
type QueryRangeResult struct {
ResultType string `json:"resultType"`
Streams []Stream `json:"streams"`
}
QueryRangeResult is the normalized Loki query_range result.
type RealLoader ¶
type RealLoader struct {
// contains filtered or unexported fields
}
RealLoader is a real Loki loader implementation.
func NewHTTPLoader ¶ added in v0.6.0
func NewHTTPLoader(httpClient *http.Client, baseURL, tenant string) *RealLoader
func (*RealLoader) LabelNames ¶
func (*RealLoader) LabelValues ¶
func (*RealLoader) QueryRange ¶
func (l *RealLoader) QueryRange(ctx context.Context, input QueryRangeInput) (QueryRangeResult, error)
Click to show internal directories.
Click to hide internal directories.