Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoaderContext ¶
func NewLoaderContext(ctx context.Context, client promclient.QueryClient, log logrus.FieldLogger) context.Context
NewLoaderContext creates a new context with the metrics loaders
Types ¶
type MetricLabel ¶
MetricLabel represents a key-value pair for a Prometheus label.
type MetricSeries ¶
type MetricSeries struct {
Labels []*MetricLabel `json:"labels"`
Values []*MetricValue `json:"values"`
}
MetricSeries represents a time series with its labels and data points.
type MetricValue ¶
MetricValue represents a single data point in a time series.
type MetricsQueryInput ¶
type MetricsQueryInput struct {
Query string `json:"query"`
Time *time.Time `json:"time,omitempty"`
Range *MetricsRangeInput `json:"range,omitempty"`
}
MetricsQueryInput represents the input for querying Prometheus metrics.
type MetricsQueryResult ¶
type MetricsQueryResult struct {
Series []*MetricSeries `json:"series"`
Warnings []string `json:"warnings,omitempty"`
}
MetricsQueryResult represents the result from a Prometheus metrics query.
func Query ¶
func Query(ctx context.Context, input MetricsQueryInput, environmentName string) (*MetricsQueryResult, error)
Query executes a Prometheus query based on the input
Click to show internal directories.
Click to hide internal directories.