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, documentID string, plugins map[string]*contracts.Configuration, pluginRegistry plugin.PluginRegistry, sendReply SendResponse, 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 ¶
MockedPluginRunner stands for a mock plugin runner.
func (*MockedPluginRunner) RunPlugins ¶
func (runnerMock *MockedPluginRunner) RunPlugins(context context.T, plugins map[string]*contracts.Configuration, 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 SendResponse ¶
type SendResponse func(messageID string, pluginID string, results map[string]*contracts.PluginResult)
SendResponse is used to send response on plugin completion. If pluginID is empty it will send responses of all plugins. If pluginID is specified, response will be sent of that particular plugin.
Click to show internal directories.
Click to hide internal directories.