Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunCommand ¶
func RunCommand(command string, workingDir string, id string, envs []string, outWriter io.Writer) error
RunCommand executes system comman end return error if any
func StartWorkerService ¶
func StartWorkerService(data *ServiceData) error
StartWorkerService starts the event queue listener service to listen for configured events return channel to track the finish event
to wait sync for the service to finish: fc, err := StartWorkerService(data) handle err <-fc // waits for finish
Types ¶
type PreloadTaskManager ¶
PreloadTaskManager manages long running process, loaded by key before processing task
type RecInfoLoader ¶
type RecInfoLoader interface {
Get(key string) (*recognizer.Info, error)
}
RecInfoLoader loads recognizer information
type ServiceData ¶
type ServiceData struct { Name string Command string WorkingDir string //ResultFile if non empty then tries to pass result to reply message from the file // changes {ID} in the file with message id ResultFile string //File to log into the cmd output LogFile string ReadFunc readFunc RecInfoLoader RecInfoLoader PreloadManager PreloadTaskManager MessageSender messages.SenderWithCorr WorkCh <-chan amqp.Delivery // contains filtered or unexported fields }
ServiceData keeps data required for service work
Click to show internal directories.
Click to hide internal directories.