Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistoryProvider ¶
type HistoryProvider interface {
GetClusterHistory() (map[model.PodID]*PodHistory, error)
}
HistoryProvider gives history of all pods in a cluster. TODO(schylek): this interface imposes how history is represented which doesn't work well with checkpoints. Consider refactoring to passing ClusterState and create history provider working with checkpoints.
func NewPrometheusHistoryProvider ¶
func NewPrometheusHistoryProvider(prometheusAddress string) HistoryProvider
NewPrometheusHistoryProvider contructs a history provider that gets data from Prometheus.
type PodHistory ¶
type PodHistory struct { // Current samples if pod is still alive, last known samples otherwise. LastLabels map[string]string LastSeen time.Time // A map for container name to a list of its usage samples, in chronological // order. Samples map[string][]model.ContainerUsageSample }
PodHistory represents history of usage and labels for a given pod.
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 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.