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 (*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.
Click to show internal directories.
Click to hide internal directories.