pluginregistry

package
v0.10.10 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelPlugin

type ModelPlugin struct {
	ID     string
	Port   uint
	Info   api.ModelInfo
	Client api.ModelPluginServiceClient
}

ModelPlugin is a record of information compiled from the configuration model plugin

func (*ModelPlugin) GetPathValues

func (p *ModelPlugin) GetPathValues(ctx context.Context, pathPrefix string, jsonData []byte) ([]*configapi.PathValue, error)

GetPathValues extracts typed path values from the specified configuration change JSON

func (*ModelPlugin) Validate

func (p *ModelPlugin) Validate(ctx context.Context, jsonData []byte) error

Validate validates the specified JSON configuration against the plugin's schema

type PluginRegistry

type PluginRegistry struct {
	// contains filtered or unexported fields
}

PluginRegistry is a set of available configuration model plugins

func NewPluginRegistry

func NewPluginRegistry(ports ...uint) *PluginRegistry

NewPluginRegistry creates a plugin registry that will search the specified gRPC ports to look for model plugins

func (*PluginRegistry) GetPlugin

func (r *PluginRegistry) GetPlugin(id string) (*ModelPlugin, bool)

GetPlugin returns the plugin with the specified ID

func (*PluginRegistry) GetPlugins

func (r *PluginRegistry) GetPlugins() []*ModelPlugin

GetPlugins returns list of all registered plugins

func (*PluginRegistry) Start

func (r *PluginRegistry) Start()

Start the plugin registry

func (*PluginRegistry) Stop

func (r *PluginRegistry) Stop()

Stop the plugin registry

Jump to

Keyboard shortcuts

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