Documentation ¶
Index ¶
- func NewQueryBuilder(metric *metricquery.Metric) querybuilder.QueryBuilder
- type GeneralMetricNamer
- type MetricNamer
- func ContainerMetricNamer(clusterid, kind, namespace, workloadName, containername, metricName string, ...) MetricNamer
- func ResourceToContainerMetricNamer(clusterid, namespace, workloadName, containername string, ...) MetricNamer
- func ResourceToWorkloadMetricNamer(clusterid string, target *corev1.ObjectReference, ...) MetricNamer
- func WorkloadMetricNamer(clusterid string, target *corev1.ObjectReference, metricName string, ...) 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
}
func (*GeneralMetricNamer) AddSelectorRequirement ¶
func (gmn *GeneralMetricNamer) AddSelectorRequirement(requirement labels.Requirement)
func (*GeneralMetricNamer) BuildUniqueKey ¶
func (gmn *GeneralMetricNamer) BuildUniqueKey() string
func (*GeneralMetricNamer) QueryBuilder ¶
func (gmn *GeneralMetricNamer) QueryBuilder() querybuilder.QueryBuilder
func (*GeneralMetricNamer) Validate ¶
func (gmn *GeneralMetricNamer) Validate() error
type MetricNamer ¶
type MetricNamer interface { // Used for datasource provider, data source provider call QueryBuilder QueryBuilder() querybuilder.QueryBuilder // Used for predictor now BuildUniqueKey() string Validate() error AddSelectorRequirement(requirement labels.Requirement) }
MetricNamer is an interface. it is the bridge between predictor and different data sources and other component.
func ContainerMetricNamer ¶
func ContainerMetricNamer(clusterid, kind, namespace, workloadName, containername, metricName string, containerLabelSelector labels.Selector) MetricNamer
func ResourceToContainerMetricNamer ¶
func ResourceToContainerMetricNamer(clusterid, namespace, workloadName, containername string, resourceName corev1.ResourceName) MetricNamer
func ResourceToWorkloadMetricNamer ¶
func ResourceToWorkloadMetricNamer(clusterid string, target *corev1.ObjectReference, resourceName corev1.ResourceName, workloadLabelSelector labels.Selector) MetricNamer
func WorkloadMetricNamer ¶
func WorkloadMetricNamer(clusterid string, target *corev1.ObjectReference, metricName string, workloadLabelSelector labels.Selector) MetricNamer
Click to show internal directories.
Click to hide internal directories.