Documentation ¶
Index ¶
Constants ¶
View Source
const ( PluginLoadedType = iota PluginUnloadedType )
View Source
const ( TaskCreatedType = iota TaskStoppedType TaskStartedType TaskRemovedType )
Variables ¶
View Source
var ( PluginRequestTypeLookup = map[PluginRequestType]string{ PluginLoadedType: "Loaded", PluginUnloadedType: "Unloaded", } TaskRequestTypeLookup = map[TaskRequestType]string{ TaskCreatedType: "Created", TaskStoppedType: "Stopped", TaskStartedType: "Started", TaskRemovedType: "Removed", } )
Functions ¶
func DispatchWorkers ¶
func DispatchWorkers(nworkers int, pluginQueue chan PluginRequest, taskQueue chan TaskRequest, quitChan chan struct{}, workerWaitGroup *sync.WaitGroup, cp ManagesPlugins, tm ManagesTasks, mm getsMembers)
Types ¶
type ManagesPlugins ¶
type ManagesPlugins interface { Load(*core.RequestedPlugin) (core.CatalogedPlugin, serror.SnapError) Unload(plugin core.Plugin) (core.CatalogedPlugin, serror.SnapError) PluginCatalog() core.PluginCatalog }
type ManagesTasks ¶
type ManagesTasks interface { GetTask(id string) (core.Task, error) CreateTaskTribe(sch schedule.Schedule, wfMap *wmap.WorkflowMap, startOnCreate bool, opts ...core.TaskOption) (core.Task, core.TaskErrors) StopTaskTribe(id string) []serror.SnapError StartTaskTribe(id string) []serror.SnapError RemoveTaskTribe(id string) error }
type PluginRequest ¶
type PluginRequest struct { Plugin core.Plugin RequestType PluginRequestType // contains filtered or unexported fields }
type PluginRequestType ¶
type PluginRequestType int
func (PluginRequestType) String ¶
func (p PluginRequestType) String() string
type TaskRequest ¶
type TaskRequest struct { Task Task RequestType TaskRequestType // contains filtered or unexported fields }
type TaskRequestType ¶
type TaskRequestType int
func (TaskRequestType) String ¶
func (t TaskRequestType) String() string
Click to show internal directories.
Click to hide internal directories.