Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrometheusClient ¶
type PrometheusClient interface { // Given a particular query (that's supposed to return range vectors // in Prometheus terminology), gets the results from Prometheus. GetTimeseries(query string) ([]Timeseries, error) }
PrometheusClient talks to Prometheus using its HTTP API.
func NewPrometheusClient ¶
func NewPrometheusClient(httpClient httpGetter, address string) PrometheusClient
NewPrometheusClient constructs a prometheusClient.
type Provider ¶
type Provider interface { // GetClusterHistory(string) GetHistoryMetrics(name, history string) (map[model.AggregateStateKey]*model.AggregateContainerState, error) GetTimeframeMetrics(name, historyLen, offset string) (map[model.AggregateStateKey]*model.AggregateContainerState, error) }
Provider gives metrics data of all pods in a cluster. Consider refactoring to passing ClusterState and create history provider working with checkpoints.
func NewPrometheusHistoryProvider ¶
NewPrometheusHistoryProvider contructs a history provider that gets data from Prometheus.
type Timeseries ¶
Timeseries represents a metric with given labels, with its values possibly changing in time.
Click to show internal directories.
Click to hide internal directories.