Documentation ¶
Index ¶
Constants ¶
View Source
const ( LabelNamePodName = "PodName" LabelNamePodNamespace = "PodNamespace" LabelNamePodUid = "PodUid" LabelNameContainerName = "ContainerName" LabelNameContainerId = "ContainerId" LabelNameHasExtRes = "HasExtRes" )
Variables ¶
This section is empty.
Functions ¶
func GetValueByName ¶ added in v0.2.0
func Labels2Maps ¶
Types ¶
type Label ¶
A Label is a Name and Value pair that provides additional information about the metric. It is metadata for the metric. For example, Kubernetes pod metrics always have 'namespace' label that represents which namespace the pod belongs to.
type QueryCondition ¶
QueryCondition is a key, operator, value triple. E.g. 'namespace = default', 'role in [Admin, Developer]'
type TimeSeries ¶
type TimeSeries struct { // A collection of Labels that are attached by monitoring system as metadata // for the metrics, which are known as dimensions. Labels []Label // A collection of Samples in chronological order. Samples []Sample }
TimeSeries is a stream of samples that belong to a metric with a set of labels
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)
func (*TimeSeries) SetLabels ¶
func (ts *TimeSeries) SetLabels(labels []Label)
func (*TimeSeries) SetSamples ¶
func (ts *TimeSeries) SetSamples(samples []Sample)
func (*TimeSeries) SortSampleAsc ¶ added in v0.3.0
func (ts *TimeSeries) SortSampleAsc()
Click to show internal directories.
Click to hide internal directories.