Documentation ¶
Index ¶
- Constants
- Variables
- func IsLabelNeedTransform(src, dest string) bool
- type BackendQueryRequestFactory
- type Data
- type LabelSelector
- type LabelSelectorKey
- type MetricType
- type MetricsDB
- type Query
- type QueryResponse
- type Sample
- type Since
- type StringOperator
- type TimeRange
- type TimeSelector
- type Timestamp
Constants ¶
View Source
const ( MetricTypeContainerCPUUsageTotal MetricType = 0 MetricTypeContainerCPUUsageTotalRate MetricType = 1 MetricTypeContainerMemoryUsage MetricType = 2 MetricTypeNodeCPUUsageSecondsAvg1M MetricType = 3 MetricTypeNodeMemoryUsageBytes MetricType = 4 StringOperatorEqueal StringOperator = 0 StringOperatorNotEqueal StringOperator = 1 LabelSelectorKeyNamespace LabelSelectorKey = "namespace" LabelSelectorKeyPodName LabelSelectorKey = "pod_name" LabelSelectorKeyContainerName LabelSelectorKey = "container_name" LabelSelectorKeyNodeName LabelSelectorKey = "node_name" )
Variables ¶
View Source
var ( LabelSelectorKeysAvailableForMetrics = map[MetricType][]LabelSelectorKey{ MetricTypeContainerCPUUsageTotal: []LabelSelectorKey{LabelSelectorKeyNamespace, LabelSelectorKeyPodName, LabelSelectorKeyContainerName}, MetricTypeContainerCPUUsageTotalRate: []LabelSelectorKey{LabelSelectorKeyNamespace, LabelSelectorKeyPodName, LabelSelectorKeyContainerName}, MetricTypeContainerMemoryUsage: []LabelSelectorKey{LabelSelectorKeyNamespace, LabelSelectorKeyPodName, LabelSelectorKeyContainerName}, MetricTypeNodeCPUUsageSecondsAvg1M: []LabelSelectorKey{LabelSelectorKeyNodeName}, MetricTypeNodeMemoryUsageBytes: []LabelSelectorKey{LabelSelectorKeyNodeName}, } )
Functions ¶
func IsLabelNeedTransform ¶
Types ¶
type BackendQueryRequestFactory ¶
type BackendQueryRequestFactory interface {
BuildServiceRequest() (interface{}, error)
}
type LabelSelector ¶
type LabelSelector struct {
Key, Value string
Op StringOperator
}
type LabelSelectorKey ¶
type LabelSelectorKey string
type MetricType ¶
type MetricType int
type MetricsDB ¶
type MetricsDB interface { Connect() error Close() error Query(q Query) (QueryResponse, error) }
type Query ¶
type Query struct { Metric MetricType TimeSelector TimeSelector LabelSelectors []LabelSelector }
type QueryResponse ¶
type QueryResponse struct { Metric MetricType Results []Data }
type StringOperator ¶
type StringOperator int
type TimeRange ¶
TimeRange Represent the range of data to query. Field Step represent the time width between each sample.
type TimeSelector ¶
type TimeSelector interface {
// contains filtered or unexported methods
}
Directories ¶
Path | Synopsis |
---|---|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.