Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Metric ¶
type Metric struct { // to be extended when new datasource is added Namespace string Kind string APIVersion string WorkloadName string PodName string ContainerName string Resource v1.ResourceName Selectors string }
func (*Metric) SetSelector ¶
type PrometheusQuery ¶
type PrometheusQuery struct {
Query string
}
type Query ¶
type Query struct { // to be extended when new datasource is added Prometheus *PrometheusQuery }
type SamplesOverview ¶
type SamplesOverview struct { AvgValue float64 MinValue float64 MaxValue float64 Percentile50thValue float64 Percentile90thValue float64 LastTimestamp int64 FirstTimestamp int64 Count int }
func GetSamplesOverview ¶
func GetSamplesOverview(timeSeries *TimeSeries) *SamplesOverview
type TimeSeries ¶
TimeSeries represents a metric with given labels, with its values possibly changing in time.
func NewTimeSeries ¶
func NewTimeSeries() *TimeSeries
func (*TimeSeries) AppendLabel ¶
func (ts *TimeSeries) AppendLabel(key, val string)
func (*TimeSeries) AppendSample ¶
func (ts *TimeSeries) AppendSample(timestamp int64, val float64)
type WorkloadKind ¶
type WorkloadKind string
WorkloadKind is k8s resource kind
const ( // workload kind is deployment WorkloadDeployment WorkloadKind = "Deployment" )
Resource Name
Click to show internal directories.
Click to hide internal directories.