v1

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine added in v0.3.0

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

Engine is the plugin engine that knows how to load, prepare and return new plugins.

func NewEngine added in v0.3.0

func NewEngine() *Engine

NewEngine returns a new plugin V1 engine.

func (*Engine) NewDataSourcePlugin added in v0.3.0

func (e *Engine) NewDataSourcePlugin(ctx context.Context, config PluginConfig) (apiv1.DataSourcePlugin, error)

func (*Engine) NewResourcePlugin added in v0.3.0

func (e *Engine) NewResourcePlugin(ctx context.Context, config PluginConfig) (apiv1.ResourcePlugin, error)

NewResourcePlugin returns a new plugin based on the plugin source code and the plugin options that will be passed on plugin creation. the resulting plugin will be able to be used.

type PluginConfig added in v0.3.0

type PluginConfig struct {
	// SourceCodeRepository is the repository where the plugin engine will get the source code for the plugin.
	SourceCodeRepository storage.SourceCodeRepository
	// PluginOptions are the options that will be passed to the plugin factory to create a new plugin.
	PluginOptions string
	// PluginFactoryName is the name that the plugin  engine will search for in the plugin factory inside
	// the plugin source code. It must meet the plugin factory signature.
	// E.g: NewResourcePlugin, NewDataSourcePlugin...
	PluginFactoryName string
}

PluginConfig is the configuration that the engine needs to instantiate a new plugin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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