schema_mgt

package
v0.9.166 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeUndefined Schema.Scope = iota
	Application
	Metric
	Planning
	Prediction
	Recommendation
	Resource
)

Table enumerator

View Source
const (
	MetricTypeUndefined Schema.MetricType = iota
	CPUUsageSecondsPercentage
	MemoryUsageBytes
	PowerUsageWatts
	TemperatureCelsius
	DutyCycle
	CurrentOffset
)

Metric type enumerator

View Source
const (
	ResourceBoundaryUndefined Schema.ResourceBoundary = iota
	ResourceRaw
	ResourceUpperBound
	ResourceLowerBound
)

Resource boundary enumerator

View Source
const (
	ResourceQuotaUndefined Schema.ResourceQuota = iota
	ResourceLimit
	ResourceRequest
	ResourceInitialLimit
	ResourceInitialRequest
)

Resource quota enumerator

Variables

View Source
var (
	InfluxConfig  *InternalInflux.Config
	RWLock        *sync.RWMutex
	Schemas       *SchemaMap
	Schemas2Write *SchemaMap
)
View Source
var DatabaseNameMap = map[Schema.Scope]string{
	Application:    "alameda_application",
	Metric:         "alameda_metric",
	Planning:       "alameda_planning",
	Prediction:     "alameda_prediction",
	Recommendation: "alameda_recommendation",
	Resource:       "alameda_resource",
}
View Source
var MeasurementNameMap = map[Schema.Scope]string{
	Application:    "application",
	Metric:         "metric",
	Planning:       "planning",
	Prediction:     "prediction",
	Recommendation: "recommendation",
	Resource:       "resource",
}
View Source
var MeasurementSchemaNameMap = map[Schema.Scope]string{
	Application:    "application_schema",
	Metric:         "metric_schema",
	Planning:       "planning_schema",
	Prediction:     "prediction_schema",
	Recommendation: "recommendation_schema",
	Resource:       "resource_schema",
}

Functions

func DeepCopy

func DeepCopy(dst interface{}, src interface{}) error

func DefaultSchemasInit

func DefaultSchemasInit()

func SchemaInit

func SchemaInit(config *config.Config) error

Types

type SchemaManagement

type SchemaManagement struct {
}

func NewSchemaManagement

func NewSchemaManagement() *SchemaManagement

func (*SchemaManagement) AddSchemas

func (p *SchemaManagement) AddSchemas(schemas []*Schema.Schema)

func (*SchemaManagement) DeleteSchemas

func (p *SchemaManagement) DeleteSchemas(table Schema.Scope, category, schemaType string) error

func (*SchemaManagement) Flush

func (p *SchemaManagement) Flush() error

func (*SchemaManagement) GetSchemas

func (p *SchemaManagement) GetSchemas(scope Schema.Scope, category, schemaType string) []*Schema.Schema

func (*SchemaManagement) Refresh

func (p *SchemaManagement) Refresh() error

type SchemaMap

type SchemaMap struct {
	Schemas map[schemas.Scope][]*schemas.Schema
}

func NewSchemaMap

func NewSchemaMap() *SchemaMap

func (*SchemaMap) AddSchema

func (p *SchemaMap) AddSchema(schema *schemas.Schema)

func (*SchemaMap) Empty

func (p *SchemaMap) Empty()

Jump to

Keyboard shortcuts

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