Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var ( // Tags Tags' name in influxdb Tags = []Tag{Namespace, PodName, Name, Metric, Granularity, Kind} // Fields Fields' name in influxdb Fields = []Field{ModelId, PredictionId, Value} // MetricTypeCPUUsage Enum of tag "metric" MetricTypeCPUUsage MetricType = "cpu_usage_seconds_percentage" // MetricTypeMemoryUsage Enum of tag "metric" MetricTypeMemoryUsage MetricType = "memory_usage_bytes" // LocalMetricTypeToPkgMetricType Convert local package metric type to package alameda.datahub.metric.NodeMetricType LocalMetricTypeToPkgMetricType = map[MetricType]metric.NodeMetricType{ MetricTypeCPUUsage: metric.TypeContainerCPUUsageSecondsPercentage, MetricTypeMemoryUsage: metric.TypeContainerMemoryUsageBytes, } // PkgMetricTypeToLocalMetricType Convert package alameda.datahub.metric.NodeMetricType to local package metric type PkgMetricTypeToLocalMetricType = map[metric.NodeMetricType]MetricType{ metric.TypeContainerCPUUsageSecondsPercentage: MetricTypeCPUUsage, metric.TypeContainerMemoryUsageBytes: MetricTypeMemoryUsage, } )
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct { Timestamp time.Time Namespace *string PodName *string Name *string Metric MetricType Granularity *string Kind string ModelId *string PredictionId *string Value *string }
Entity Container prediction entity in influxDB
func NewEntityFromMap ¶
NewEntityFromMap Build entity from map
func (Entity) ContainerPrediction ¶
func (e Entity) ContainerPrediction() prediction.ContainerPrediction
ContainerPrediction Create container prediction base on entity
type MetricType ¶
type MetricType = string
Click to show internal directories.
Click to hide internal directories.