Documentation ¶
Index ¶
- Variables
- func CompareMeasurement(old *Measurement, new *Measurement) bool
- func CompareSchemaMeta(old *SchemaMeta, new *SchemaMeta) bool
- type Column
- type ColumnType
- type Measurement
- func (p *Measurement) AddColumn(name string, required bool, columnType ColumnType, dataType common.DataType)
- func (p *Measurement) ColumnRequired(columns []string) error
- func (p *Measurement) ColumnSupported(columns []string) error
- func (p *Measurement) ColumnTag(columns []string) error
- func (p *Measurement) Copy(measurement *Measurement) error
- func (p *Measurement) GetFields() []*Column
- func (p *Measurement) GetTags() []*Column
- func (p *Measurement) Initialize(columns string) error
- func (p *Measurement) String() string
- type MetricType
- type ResourceBoundary
- type ResourceQuota
- type Schema
- type SchemaMeta
- type Scope
Constants ¶
This section is empty.
Variables ¶
View Source
var ColumnTypeValue = map[string]ColumnType{ "undefined": ColumnTypeUndefined, "tag": Tag, "field": Field, }
View Source
var DatabaseNameMap = map[Scope]string{
Application: "alameda_application",
Fedemeter: "alameda_fedemeter",
Metric: "alameda_metric",
Planning: "alameda_planning",
Prediction: "alameda_prediction",
Recommendation: "alameda_recommendation",
Resource: "alameda_cluster_status",
Target: "alameda_target",
}
View Source
var MeasurementNameMap = map[Scope]string{
Application: "application",
Fedemeter: "fedemeter",
Metric: "metric",
Planning: "planning",
Prediction: "prediction",
Recommendation: "recommendation",
Resource: "resource",
Target: "target",
}
View Source
var MeasurementSchemaNameMap = map[Scope]string{
Application: "application_schema",
Fedemeter: "fedemeter_schema",
Metric: "metric_schema",
Planning: "planning_schema",
Prediction: "prediction_schema",
Recommendation: "recommendation_schema",
Resource: "resource_schema",
Target: "target_schema",
}
View Source
var MetricTypeValue = map[string]MetricType{ "undefined": MetricTypeUndefined, "cpu_seconds_total": CPUSecondsTotal, "cpu_cores_alloc": CPUCoresAllocatable, "cpu_millicores_total": CPUMilliCoresTotal, "cpu_millicores_avail": CPUMilliCoresAvail, "cpu_millicores_usage": CPUMilliCoresUsage, "cpu_millicores_usage_pct": CPUMilliCoresUsagePCT, "memory_bytes_alloc": MemoryBytesAllocatable, "memory_bytes_total": MemoryBytesTotal, "memory_bytes_avail": MemoryBytesAvail, "memory_bytes_usage": MemoryBytesUsage, "memory_bytes_usage_pct": MemoryBytesUsagePCT, "fs_bytes_total": FSBytesTotal, "fs_bytes_avail": FSBytesAvail, "fs_bytes_usage": FSBytesUsage, "fs_bytes_usage_pct": FSBytesUsagePCT, "http_req_count": HttpRequestsCount, "http_req_total": HttpRequestsTotal, "http_response_count": HttpResponseCount, "http_response_total": HttpResponseTotal, "disk_io_seconds_total": DiskIOSecondsTotal, "disk_io_util": DiskIOUtilization, "restarts_total": RestartsTotal, "unschedulable": Unschedulable, "health": Health, "power_usage_watts": PowerUsageWatts, "temperature_celsius": TemperatureCelsius, "duty_cycle": DutyCycle, "current_offset": CurrentOffset, "lag": Lag, "latency": Latency, "number": Number, }
View Source
var ResourceBoundaryValue = map[string]ResourceBoundary{ "undefined": ResourceBoundaryUndefined, "raw": ResourceRaw, "upper_bound": ResourceUpperBound, "lower_bound": ResourceLowerBound, }
View Source
var ResourceQuotaValue = map[string]ResourceQuota{ "undefined": ResourceQuotaUndefined, "limit": ResourceLimit, "request": ResourceRequest, "initial_limit": ResourceInitialLimit, "initial_request": ResourceInitialRequest, }
View Source
var ScopeValue = map[string]Scope{ "undefined": ScopeUndefined, "application": Application, "fedemeter": Fedemeter, "metric": Metric, "planning": Planning, "prediction": Prediction, "recommendation": Recommendation, "resource": Resource, "target": Target, }
Functions ¶
func CompareMeasurement ¶
func CompareMeasurement(old *Measurement, new *Measurement) bool
func CompareSchemaMeta ¶
func CompareSchemaMeta(old *SchemaMeta, new *SchemaMeta) bool
Types ¶
type Column ¶
type Column struct { Name string Required bool ColumnType ColumnType DataType common.DataType }
type ColumnType ¶
type ColumnType int
const ( ColumnTypeUndefined ColumnType = iota Tag Field )
Influxdb column type enumerator
type Measurement ¶
type Measurement struct { Name string MetricType MetricType Boundary ResourceBoundary Quota ResourceQuota IsTS bool Columns []*Column }
func NewMeasurement ¶
func NewMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota, isTS bool) *Measurement
func (*Measurement) AddColumn ¶
func (p *Measurement) AddColumn(name string, required bool, columnType ColumnType, dataType common.DataType)
func (*Measurement) ColumnRequired ¶
func (p *Measurement) ColumnRequired(columns []string) error
func (*Measurement) ColumnSupported ¶
func (p *Measurement) ColumnSupported(columns []string) error
func (*Measurement) ColumnTag ¶
func (p *Measurement) ColumnTag(columns []string) error
func (*Measurement) Copy ¶
func (p *Measurement) Copy(measurement *Measurement) error
func (*Measurement) GetFields ¶
func (p *Measurement) GetFields() []*Column
func (*Measurement) GetTags ¶
func (p *Measurement) GetTags() []*Column
func (*Measurement) Initialize ¶
func (p *Measurement) Initialize(columns string) error
func (*Measurement) String ¶
func (p *Measurement) String() string
type MetricType ¶
type MetricType int
const ( MetricTypeUndefined MetricType = iota CPUSecondsTotal CPUCoresAllocatable CPUMilliCoresTotal CPUMilliCoresAvail CPUMilliCoresUsage CPUMilliCoresUsagePCT MemoryBytesAllocatable MemoryBytesTotal MemoryBytesAvail MemoryBytesUsage MemoryBytesUsagePCT FSBytesTotal FSBytesAvail FSBytesUsage FSBytesUsagePCT HttpRequestsCount HttpRequestsTotal HttpResponseCount HttpResponseTotal DiskIOSecondsTotal DiskIOUtilization RestartsTotal Unschedulable Health PowerUsageWatts TemperatureCelsius DutyCycle CurrentOffset Lag Latency Number )
Metric type enumerator
type ResourceBoundary ¶
type ResourceBoundary int
const ( ResourceBoundaryUndefined ResourceBoundary = iota ResourceRaw ResourceUpperBound ResourceLowerBound )
Resource boundary enumerator
type ResourceQuota ¶
type ResourceQuota int
const ( ResourceQuotaUndefined ResourceQuota = iota ResourceLimit ResourceRequest ResourceInitialLimit ResourceInitialRequest )
Resource quota enumerator
type Schema ¶
type Schema struct { SchemaMeta *SchemaMeta Measurements []*Measurement }
func (*Schema) AddMeasurement ¶
func (p *Schema) AddMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota, isTS bool, columns string) error
func (*Schema) GetMeasurement ¶
func (p *Schema) GetMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota) *Measurement
type SchemaMeta ¶
func NewSchemaMeta ¶
func NewSchemaMeta(scope Scope, category, schemaType string) *SchemaMeta
Click to show internal directories.
Click to hide internal directories.