manager

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewOptions

type NewOptions struct {
	// PluginPath is the path to listen to, which stores all the plugins.
	PluginPath string
	// Client is the k8s client of the tenant cluster.
	Client client.Client
}

NewOptions stores the options of NewPluginManagement.

type RuntimePluginManager

type RuntimePluginManager struct {
	// HookFactoryIndex is the index to find the 'HookFactory' based on the pipeline type and hook name.
	HookFactoryIndex map[string]map[string]*component.HookFactory
	// Plugins stores the loaded components, with the index being the file name of the plugin.
	Plugins map[string]pipelinePlugin
	// PluginHomePath is the directory of the plugin to be monitored.
	PluginHomePath string
	// contains filtered or unexported fields
}

func NewPluginManagement

func NewPluginManagement(opts *NewOptions) (*RuntimePluginManager, error)

NewPluginManagement will generate a new PluginManagement, and users can adjust the build parameters through the opts.

func (*RuntimePluginManager) GetHookFactory

func (pm *RuntimePluginManager) GetHookFactory(pipelineType, hookName string) (component.HookFactory, error)

func (*RuntimePluginManager) Kill

func (pm *RuntimePluginManager) Kill()

Kill will send an exit message to the Run method and wait for the Run method to exit.

func (*RuntimePluginManager) Run

func (pm *RuntimePluginManager) Run() error

Run will start listening to the plugin directory, and upload the hook information to the cluster where Nautes is located.

func (*RuntimePluginManager) UploadHooksMetadata

func (pm *RuntimePluginManager) UploadHooksMetadata() error

UploadHooksMetadata uploads all the metadata information of the loaded plugins to the tenant cluster.

Jump to

Keyboard shortcuts

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