schemas

package
v4.2.731+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name       string
	Required   bool
	ColumnType ColumnType
	DataType   common.DataType
}

func NewColumn

func NewColumn() *Column

func (*Column) Parse

func (p *Column) Parse(column string) error

func (*Column) String

func (p *Column) String() string

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
	Columns    []*Column
}

func NewMeasurement

func NewMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota) *Measurement

func (*Measurement) AddColumn

func (p *Measurement) AddColumn(name string, required bool, columnType ColumnType, dataType common.DataType)

func (*Measurement) Initialize

func (p *Measurement) Initialize(columns string) error

func (*Measurement) String

func (p *Measurement) String() string

func (*Measurement) Validate

func (p *Measurement) Validate(columns []string) error

type MetricType

type MetricType int
const (
	MetricTypeUndefined MetricType = iota
	CPUUsageSecondsPercentage
	MemoryUsageBytes
	PowerUsageWatts
	TemperatureCelsius
	DutyCycle
	CurrentOffset
	Lag
)

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 NewSchema

func NewSchema(scope Scope, category, schemaType string) *Schema

func (*Schema) AddMeasurement

func (p *Schema) AddMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota, columns string) error

func (*Schema) GetMeasurement

func (p *Schema) GetMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota) *Measurement

func (*Schema) String

func (p *Schema) String() string

func (*Schema) Validate

func (p *Schema) Validate() error

type SchemaMeta

type SchemaMeta struct {
	Scope    Scope
	Category string
	Type     string
}

func NewSchemaMeta

func NewSchemaMeta(scope Scope, category, schemaType string) *SchemaMeta

type Scope

type Scope int
const (
	ScopeUndefined Scope = iota
	Application
	Metric
	Planning
	Prediction
	Recommendation
	Resource
)

Table enumerator

Jump to

Keyboard shortcuts

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