schemamgt

package
v4.2.720+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

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 []*InternalSchemas.Schema)

func (*SchemaManagement) DeleteSchemas

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

func (*SchemaManagement) Flush

func (p *SchemaManagement) Flush() error

func (*SchemaManagement) GetSchemas

func (p *SchemaManagement) GetSchemas(scope InternalSchemas.Scope, category, schemaType string) []*InternalSchemas.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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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