manager

package
v0.0.0-...-955c50f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package manager encapsulates everything related to long running plugin manager that starts, stops & configures long running plugins

Index

Constants

View Source
const CloudWatchId = "aws:cloudWatch"

CloudWatchId represents the ID of cloud watch plugin

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	mock.Mock
}

Mock stands for a mocked manager.

func NewMockDefault

func NewMockDefault() *Mock

NewMockDefault returns an instance of Mock with default expectations set.

func (*Mock) EnsurePluginRegistered

func (m *Mock) EnsurePluginRegistered(name string, plugin managerContracts.Plugin) (err error)

EnsurePluginRegistered adds a long-running plugin if it is not already in the registry

func (*Mock) GetRegisteredPlugins

func (m *Mock) GetRegisteredPlugins() map[string]managerContracts.Plugin

GetRegisteredPlugins returns a map of all registered long running plugins - return the specified plugin map for testing here

func (*Mock) ModuleExecute

func (m *Mock) ModuleExecute() (err error)

Execute starts long running plugin manager and returns encountered error - returns nil here for testing

func (*Mock) ModuleName

func (m *Mock) ModuleName() string

Name returns the module name

func (*Mock) ModuleStop

func (m *Mock) ModuleStop() (err error)

RequestStop handles the termination of the message processor plugin job and returns encountered error - returns nil here for testing

func (*Mock) StartPlugin

func (m *Mock) StartPlugin(name, configuration, orchestrationDir string, cancelFlag task.CancelFlag, out iohandler.IOHandler) (err error)

StartPlugin starts the given plugin with the given configuration and returns encountered error - returns nil here for testing

func (*Mock) StopPlugin

func (m *Mock) StopPlugin(name string, cancelFlag task.CancelFlag) (err error)

StopPlugin stops a given plugin from executing and returns encountered error - returns nil here for testing

Jump to

Keyboard shortcuts

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