Documentation ¶
Overview ¶
Package longrunningprovider provides an interface to start/stop a worker process for long-running tasks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IContainer ¶
IContainer is the interface for starting/terminating/watching worker
type WorkerContainer ¶
WorkerContainers contains list of running workers, it starts/terminates/watches workers
func NewWorkerContainer ¶
func NewWorkerContainer( context context.ICoreAgentContext, messageBus messagebus.IMessageBus) *WorkerContainer
NewWorkerContainer returns worker container
func (*WorkerContainer) Monitor ¶
func (container *WorkerContainer) Monitor()
Monitor watches worker process, restarts the worker when receive worker exist signal
func (*WorkerContainer) Start ¶
func (container *WorkerContainer) Start()
Start identifies and loads the worker configs and starts long running workers
func (*WorkerContainer) Stop ¶
func (container *WorkerContainer) Stop(stopType reboot.StopType)
Stop stops monitor and stop all the running workers
Directories ¶
Path | Synopsis |
---|---|
Package datastore provides interface to read and write json data from/to disk
|
Package datastore provides interface to read and write json data from/to disk |
filesystem
Package filesystem contains related functions from os, io, and io/ioutil packages
|
Package filesystem contains related functions from os, io, and io/ioutil packages |
Package discover finds worker configs for the core agent.
|
Package discover finds worker configs for the core agent. |
Package model contains data objects for long running container
|
Package model contains data objects for long running container |
Package provider implements logic for allowing interaction with worker processes
|
Package provider implements logic for allowing interaction with worker processes |
Click to show internal directories.
Click to hide internal directories.