Documentation
¶
Index ¶
- func FiltersToLabels(filts filters.SingleQuery) ([]string, string)
- func GetLabelValues(ctx context.Context, cl api.Client, label string, match []string) ([]string, int, error)
- func GetLabelsAndFilter(aggregate, groups string) ([]string, string)
- func NewClient(cfg *config.Prometheus, requestHeader http.Header) (api.Client, error)
- func QueryFilters(metric string, filters filters.SingleQuery) string
- func QueryMatrix(ctx context.Context, cl api.Client, q *Query) (model.QueryResponse, int, error)
- type Inventory
- type Query
- type QueryBuilder
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FiltersToLabels ¶
func FiltersToLabels(filts filters.SingleQuery) ([]string, string)
FiltersToLabels converts filters to labels (extracting keys) and direction, checking for any unsupported filters. If unsupported, returns a reason as the second value
func GetLabelValues ¶
func GetLabelsAndFilter ¶
func QueryFilters ¶
func QueryFilters(metric string, filters filters.SingleQuery) string
Types ¶
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
func NewInventory ¶
func NewInventory(cfg *config.Prometheus) *Inventory
func (*Inventory) LabelExists ¶
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
func NewQuery ¶
func NewQuery(in *loki.TopologyInput, qr *v1.Range, filters filters.SingleQuery, orMetrics []string) *QueryBuilder
func (*QueryBuilder) Build ¶
func (q *QueryBuilder) Build() Query
type SearchResult ¶
type SearchResult struct {
Found []string // Multiple metrics in case we need to run <ingress metric> OR <egress metric>
Candidates []string
MissingLabels []string
}
func (*SearchResult) FormatCandidates ¶
func (r *SearchResult) FormatCandidates() string
func (*SearchResult) FormatMissingLabels ¶
func (r *SearchResult) FormatMissingLabels() string
Click to show internal directories.
Click to hide internal directories.