Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricsStatePathToRoot = "prometheusMetricsAdapter.internal.customMetrics" ClusteredPart = "cluster" NamespacedPart = "namespaced" )
View Source
const ( MetricDaemonSet = "daemonset" MetricDeployment = "deployment" MetricIngress = "ingress" MetricNamespace = "namespace" MetricPod = "pod" MetricService = "service" MetricStatefulSet = "statefulset" )
Variables ¶
View Source
var AllMetricsTypes = map[string]string{ MetricDaemonSet: "DaemonSet", MetricDeployment: "Deployment", MetricIngress: "Ingress", MetricNamespace: "Namespace", MetricPod: "Pod", MetricService: "Service", MetricStatefulSet: "StatefulSet", }
AllMetricsTypes type (in lower case) => kind
Functions ¶
Types ¶
type CustomMetric ¶
type MetricsQueriesState ¶
MetricsQueriesState Examples for full path namespaced
prometheusMetricsAdapter.internal.customMetrics.pod.name.namespaced.ns1
cluster
prometheusMetricsAdapter.internal.customMetrics.pod.name.cluster
in this state we have all keys after 'customMetrics' we collect all current metrics and replace 'customMetrics' 'customMetrics' is map which should have (metric type) 'pod, ingress... etc' keys in constructor we create it
func NewMetricsQueryValues ¶
func NewMetricsQueryValues() *MetricsQueriesState
func (*MetricsQueriesState) AddMetric ¶
func (s *MetricsQueriesState) AddMetric(m *CustomMetric)
Click to show internal directories.
Click to hide internal directories.