engine

package
v0.0.0-...-84afe80 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package engine contains the general purpose plugin runner of the plugin framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunPlugins

func RunPlugins(
	context context.T,
	executionID string,
	documentCreatedDate string,
	plugins []docModel.PluginState,
	pluginRegistry runpluginutil.PluginRegistry,
	sendReply runpluginutil.SendResponse,
	updateAssoc runpluginutil.UpdateAssociation,
	cancelFlag task.CancelFlag,
) (pluginOutputs map[string]*contracts.PluginResult)

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.

Types

type MockedPluginRunner

type MockedPluginRunner struct {
	mock.Mock
}

MockedPluginRunner stands for a mock plugin runner.

func (*MockedPluginRunner) RunPlugins

func (runnerMock *MockedPluginRunner) RunPlugins(context context.T, plugins map[string]model.PluginState, cancelFlag task.CancelFlag) (pluginOutputs map[string]*contracts.PluginResult)

RunPlugins mocks the RunPlugins method.

type SendDocumentLevelResponse

type SendDocumentLevelResponse func(messageID string, resultStatus contracts.ResultStatus, documentTraceOutput string)

SendDocumentLevelResponse is used to send status response before plugin begins

type UpdateAssociation

type UpdateAssociation func(log log.T, executionID string, documentCreatedDate string, pluginOutputs map[string]*contracts.PluginResult, totalNumberOfPlugins int)

UpdateAssociation updates association status

Jump to

Keyboard shortcuts

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