initialization

package
v1.9.2-0...-989ee68 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendClientInit

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

BackendClientInit implements an InitializeFunc for initializing a backend plugin process.

It uses the envvars.Provider to retrieve the environment variables required for the plugin and the plugins.BackendFactoryProvider to get fetch backend factory, which is used to form a connection to the backend plugin process.

Note: This step does not start the backend plugin process. Please see BackendClientStarter for starting the backend plugin process.

func (*BackendClientInit) Initialize

func (b *BackendClientInit) Initialize(ctx context.Context, p *plugins.Plugin) (*plugins.Plugin, error)

Initialize will initialize a backend plugin client, if the plugin is a backend plugin.

type BackendClientStarter

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

BackendClientStarter implements an InitializeFunc for starting a backend plugin process.

func (*BackendClientStarter) Start

Start will start the backend plugin process.

type Initialize

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

func New

func New(cfg *config.PluginManagementCfg, opts Opts) *Initialize

New returns a new Initialization stage.

func (*Initialize) Initialize

func (i *Initialize) Initialize(ctx context.Context, ps *plugins.Plugin) (*plugins.Plugin, error)

Initialize will execute the Initialize steps of the Initialization stage.

type InitializeFunc

type InitializeFunc func(ctx context.Context, p *plugins.Plugin) (*plugins.Plugin, error)

InitializeFunc is the function used for the Initialize step of the Initialization stage.

func BackendClientInitStep

func BackendClientInitStep(envVarProvider envvars.Provider,
	backendProvider plugins.BackendFactoryProvider, tracer trace.Tracer) InitializeFunc

BackendClientInitStep returns a new InitializeFunc for registering a backend plugin process.

func BackendProcessStartStep

func BackendProcessStartStep(processManager process.Manager) InitializeFunc

BackendProcessStartStep returns a new InitializeFunc for starting a backend plugin process.

func PluginRegistrationStep

func PluginRegistrationStep(pluginRegistry registry.Service) InitializeFunc

PluginRegistrationStep returns a new InitializeFunc for registering a plugin with the plugin registry.

type Initializer

type Initializer interface {
	Initialize(ctx context.Context, ps *plugins.Plugin) (*plugins.Plugin, error)
}

Initializer is responsible for the Initialization stage of the plugin loader pipeline.

type Opts

type Opts struct {
	InitializeFuncs []InitializeFunc
}

type PluginRegistration

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

PluginRegistration implements an InitializeFunc for registering a plugin with the plugin registry.

func (*PluginRegistration) Initialize

func (r *PluginRegistration) Initialize(ctx context.Context, p *plugins.Plugin) (*plugins.Plugin, error)

Initialize registers the plugin with the plugin registry.

Jump to

Keyboard shortcuts

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