schemas

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHotReloaders

func NewHotReloaders(loaders []Loader) (async.SimpleTask, async.SimpleTask, error)

Types

type Loader

type Loader interface {
	Load() error
	GetSchemaPath() string
}

type Reloader

type Reloader struct {
	async.SimpleTask
	Loaders        []Loader
	LoaderCallback func()
}

func (*Reloader) Execute

func (r *Reloader) Execute(ctx context.Context, _ context.CancelFunc) error

func (*Reloader) String

func (r *Reloader) String() string

type Schemas

type Schemas interface {
	ValidateDatasource(plugin common.Plugin, dtsName string) error
	ValidatePanels(panels map[string]*modelV1.Panel) error
	ValidatePanel(plugin common.Plugin, panelName string) error
	ValidateGlobalVariable(v modelV1.VariableSpec) error
	ValidateDashboardVariables([]dashboard.Variable) error
	ValidateVariable(plugin common.Plugin, varName string) error
	GetLoaders() []Loader
}

func New

func New(conf config.Schemas) (Schemas, error)

type Watcher

type Watcher struct {
	async.Task
	FSWatcher      *fsnotify.Watcher
	Loaders        []Loader
	LoaderCallback func()
}

func (*Watcher) Execute

func (w *Watcher) Execute(ctx context.Context, cancel context.CancelFunc) error

func (*Watcher) Finalize

func (w *Watcher) Finalize() error

func (*Watcher) Initialize

func (w *Watcher) Initialize() error

func (*Watcher) String

func (w *Watcher) String() string

Jump to

Keyboard shortcuts

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