Documentation ¶
Index ¶
- func NewQueryBuilder(metric *metricquery.Metric) querybuilder.QueryBuilder
- type GeneralMetricNamer
- type MetricNamer
- func ResourceToContainerMetricNamer(namespace, apiVersion, workloadKind, workloadName, containerName string, ...) MetricNamer
- func ResourceToGeneralMetricNamer(queryExpr string, resourceName corev1.ResourceName, ...) MetricNamer
- func ResourceToWorkloadMetricNamer(target *corev1.ObjectReference, resourceName *corev1.ResourceName, ...) MetricNamer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQueryBuilder ¶
func NewQueryBuilder(metric *metricquery.Metric) querybuilder.QueryBuilder
Types ¶
type GeneralMetricNamer ¶
type GeneralMetricNamer struct { Metric *metricquery.Metric CallerName string }
func (*GeneralMetricNamer) BuildUniqueKey ¶
func (gmn *GeneralMetricNamer) BuildUniqueKey() string
func (*GeneralMetricNamer) Caller ¶ added in v0.5.0
func (gmn *GeneralMetricNamer) Caller() string
func (*GeneralMetricNamer) QueryBuilder ¶
func (gmn *GeneralMetricNamer) QueryBuilder() querybuilder.QueryBuilder
func (*GeneralMetricNamer) Validate ¶
func (gmn *GeneralMetricNamer) Validate() error
type MetricNamer ¶
type MetricNamer interface { // QueryBuilder used for datasource provider, data source provider call QueryBuilder QueryBuilder() querybuilder.QueryBuilder // BuildUniqueKey used for predictor now BuildUniqueKey() string Validate() error // Caller means the caller of this MetricNamer, different caller maybe use the same metric Caller() string }
MetricNamer is an interface. it is the bridge between predictor and different data sources and other component such as caller.
func ResourceToContainerMetricNamer ¶ added in v0.7.0
func ResourceToContainerMetricNamer(namespace, apiVersion, workloadKind, workloadName, containerName string, resourceName corev1.ResourceName, caller string) MetricNamer
func ResourceToGeneralMetricNamer ¶ added in v0.11.0
func ResourceToGeneralMetricNamer(queryExpr string, resourceName corev1.ResourceName, nodeLabelSelector labels.Selector, caller string) MetricNamer
func ResourceToWorkloadMetricNamer ¶ added in v0.7.0
func ResourceToWorkloadMetricNamer(target *corev1.ObjectReference, resourceName *corev1.ResourceName, workloadLabelSelector labels.Selector, caller string) MetricNamer
Click to show internal directories.
Click to hide internal directories.