node

package
v4.2.301+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Time        Tag = "time"
	Name        Tag = "name"
	Metric      Tag = "metric"
	IsScheduled Tag = "is_scheduled"
	Granularity Tag = "granularity"
	Kind        Tag = "kind"

	Value Field = "value"
)

Variables

View Source
var (
	// Tags Tags' name in influxdb
	Tags = []Tag{Name, Metric, IsScheduled, Granularity, Kind}
	// Fields Fields' name in influxdb
	Fields = []Field{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.TypeNodeCPUUsageSecondsPercentage,
		MetricTypeMemoryUsage: metric.TypeNodeMemoryUsageBytes,
	}

	// PkgMetricTypeToLocalMetricType Convert package alameda.datahub.metric.NodeMetricType to local package metric type
	PkgMetricTypeToLocalMetricType = map[metric.NodeMetricType]MetricType{
		metric.TypeNodeCPUUsageSecondsPercentage: MetricTypeCPUUsage,
		metric.TypeNodeMemoryUsageBytes:          MetricTypeMemoryUsage,
	}
)

Functions

This section is empty.

Types

type Entity

type Entity struct {
	Timestamp time.Time

	Name        *string
	Metric      *MetricType
	Value       *string
	IsScheduled *string
}

Entity Container prediction entity in influxDB

func NewEntityFromMap

func NewEntityFromMap(data map[string]string) Entity

NewEntityFromMap Build entity from map

func (Entity) NodePrediction

func (e Entity) NodePrediction() prediction.NodePrediction

NodePrediction Create container prediction base on entity

type Field

type Field = string

type MetricType

type MetricType = string

type Tag

type Tag = string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL