Documentation ¶
Overview ¶
Package manager encapsulates everything related to long running plugin manager that starts, stops & configures long running plugins
Package manager encapsulates everything related to long running plugin manager that starts, stops & configures long running plugins
Package manager encapsulates everything related to long running plugin manager that starts, stops & configures long running plugins
Package manager encapsulates everything related to long running plugin manager that starts, stops & configures long running plugins
Index ¶
- Constants
- func CreateResult(msg string, status contracts.ResultStatus, res *contracts.PluginResult)
- func EnsureInitialization(context context.T)
- func Invoke(context context.T, pluginID string, res *contracts.PluginResult, ...)
- func RegisteredPlugins(context context.T) map[string]plugin.Plugin
- type Manager
- func (m *Manager) EnsurePluginRegistered(name string, plugin managerContracts.Plugin) (err error)
- func (m *Manager) GetRegisteredPlugins() map[string]managerContracts.Plugin
- func (m *Manager) ModuleExecute() (err error)
- func (m *Manager) ModuleName() string
- func (m *Manager) ModuleStop() (err error)
- func (m *Manager) StartPlugin(name, configuration string, orchestrationDir string, ...) (err error)
- func (m *Manager) StopPlugin(name string, cancelFlag task.CancelFlag) (err error)
- type T
Constants ¶
const ( //Name is the core module name for long running plugins manager Name = "LongRunningPluginsManager" // NameOfCloudWatchJsonFile is the name of ec2 config cloudwatch local configuration file NameOfCloudWatchJsonFile = "AWS.EC2.Windows.CloudWatch.json" //NumberOfLongRunningPluginWorkers represents number of long-running workers NumberOfLongRunningPluginWorkers = 5 //NumberOfCancelWorkers represents number of cancel workers NumberOfCancelWorkers = 5 // PollFrequencyMinutes represents poll frequency for managing lifecycle of long running plugins PollFrequencyMinutes = 15 // StopTimeout is the time before the manager will be shutdown during a stop = 24 seconds StopTimeout = 24 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func CreateResult ¶
func CreateResult(msg string, status contracts.ResultStatus, res *contracts.PluginResult)
func EnsureInitialization ¶
EnsureManagerIsInitialized ensures that manager is initialized at least once
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the core module - that manages long running plugins
func GetInstance ¶
GetInstance returns an instance of Manager if its initialized otherwise it returns an error
func (*Manager) EnsurePluginRegistered ¶
func (m *Manager) EnsurePluginRegistered(name string, plugin managerContracts.Plugin) (err error)
EnsurePluginRegistered adds a long-running plugin if it is not already in the registry
func (*Manager) GetRegisteredPlugins ¶
func (m *Manager) GetRegisteredPlugins() map[string]managerContracts.Plugin
GetRegisteredPlugins returns a map of all registered long running plugins
func (*Manager) ModuleExecute ¶
Execute starts long running plugin manager
func (*Manager) ModuleStop ¶
RequestStop handles the termination of the long running plugin manager
func (*Manager) StartPlugin ¶
func (m *Manager) StartPlugin(name, configuration string, orchestrationDir string, cancelFlag task.CancelFlag, out iohandler.IOHandler) (err error)
StartPlugin starts the given plugin with the given configuration
func (*Manager) StopPlugin ¶
func (m *Manager) StopPlugin(name string, cancelFlag task.CancelFlag) (err error)
StopPlugin stops a given plugin from executing
type T ¶
type T interface { contracts.ICoreModule GetRegisteredPlugins() map[string]managerContracts.Plugin StopPlugin(name string, cancelFlag task.CancelFlag) (err error) StartPlugin(name, configuration string, orchestrationDir string, cancelFlag task.CancelFlag, out iohandler.IOHandler) (err error) EnsurePluginRegistered(name string, plugin managerContracts.Plugin) (err error) }
T manages long running plugins - get information of long running plugins and starts, stops & configures long running plugins