runpluginutil

package
v0.0.0-...-a9ed6da Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package runpluginutil run plugin utility functions without referencing the actually plugin impl packages

Package runpluginutil run plugin utility functions without referencing the actually plugin impl packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPropertyName

func GetPropertyName(rawPluginInput interface{}) (propertyName string, err error)

func IsPluginSupportedForCurrentPlatform

func IsPluginSupportedForCurrentPlatform(log log.T, pluginName string) (isKnown bool, isSupported bool, message string)

IsPluginSupportedForCurrentPlatform always returns true for plugins that exist for linux because currently there are no plugins that are supported on only one distribution or version of linux.

func RunPlugins

func RunPlugins(
	context context.T,
	plugins []contracts.PluginState,
	ioConfig contracts.IOConfiguration,
	pluginRegistry PluginRegistry,
	resChan chan contracts.PluginResult,
	cancelFlag task.CancelFlag,
) (pluginOutputs map[string]*contracts.PluginResult)

TODO remove executionID and creation date RunPlugins executes a set of plugins. The plugin configurations are given in a map with pluginId as key. Outputs the results of running the plugins, indexed by pluginId. Make this function private in case everybody tries to reference it everywhere, this is a private member of Executer

Types

type Factory

type Factory interface {
	Create(context context.T) (T, error)
}

type PluginFactoryMock

type PluginFactoryMock struct {
	mock.Mock
}

func (*PluginFactoryMock) Create

func (m *PluginFactoryMock) Create(context context.T) (T, error)

type PluginMock

type PluginMock struct {
	mock.Mock
}

Mock stands for a mocked plugin.

func (*PluginMock) Execute

func (m *PluginMock) Execute(context context.T, config contracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler)

type PluginRegistry

type PluginRegistry map[string]Factory

PluginRegistry stores a set of plugins (both worker and long running plugins), indexed by ID.

var SSMPluginRegistry PluginRegistry

type T

type T interface {
	Execute(context context.T, config contracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler)
}

Jump to

Keyboard shortcuts

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