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(config PrometheusHistoryProviderConfig) (HistoryProvider, error)
NewPrometheusHistoryProvider constructs 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 PrometheusBasicAuthTransport ¶ added in v1.0.0
PrometheusBasicAuthTransport contains the username and password of prometheus server
type PrometheusHistoryProviderConfig ¶
type PrometheusHistoryProviderConfig struct { Address string QueryTimeout time.Duration HistoryLength, HistoryResolution string PodLabelPrefix, PodLabelsMetricName string PodNamespaceLabel, PodNameLabel string CtrNamespaceLabel, CtrPodNameLabel, CtrNameLabel string CadvisorMetricsJobName string Namespace string PrometheusBasicAuthTransport }
PrometheusHistoryProviderConfig allow to select which metrics should be queried to get real resource utilization.
type Timeseries ¶
Timeseries represents a metric with given labels, with its values possibly changing in time.