schemamgt

package
v4.3.1008+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 14 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 DefaultSchemas = map[string][]interface{}{
	"application":    defaults.DefaultSchemaApplication(),
	"config":         defaults.DefaultSchemaConfig(),
	"fedemeter":      defaults.DefaultSchemaFedemeter(),
	"metering":       defaults.DefaultSchemaMetering(),
	"metric":         defaults.DefaultSchemaMetric(),
	"planning":       defaults.DefaultSchemaPlanning(),
	"prediction":     defaults.DefaultSchemaPrediction(),
	"recommendation": defaults.DefaultSchemaRecommendation(),
	"resource":       defaults.DefaultSchemaResource(),
	"target":         defaults.DefaultSchemaTarget(),
}

Functions

func DefaultSchemasInit

func DefaultSchemasInit()

func NewMeasurement

func NewMeasurement(entity interface{}) *schemas.Measurement

func NewSchema

func NewSchema(entity interface{}) *schemas.Schema

func NewSchemaMeta

func NewSchemaMeta(entity interface{}) *schemas.SchemaMeta

func SchemaInit

func SchemaInit(config *influxdb.Config) error

Types

type SchemaManagement

type SchemaManagement struct {
}

func NewSchemaManagement

func NewSchemaManagement() *SchemaManagement

func (*SchemaManagement) AddSchemas

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

func (*SchemaManagement) DeleteSchemas

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

func (*SchemaManagement) Flush

func (p *SchemaManagement) Flush() error

func (*SchemaManagement) GetSchema

func (p *SchemaManagement) GetSchema(schemaScope InfluxSchemas.Scope, schemaCategory, schemaType string) *InfluxSchemas.Schema

func (*SchemaManagement) GetSchemas

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