package
0.0.0-20250206095323-67f4e8942fa5
Repository: https://github.com/noxyicm/wsf.git
Documentation: pkg.go.dev
# Functions
HandleTask creates a new instance of task specific handler and runs a routine for it.
HasHandler return true if handler by name handlerName is in handlers map.
NewHandler return new instance of handler by name handlerName.
NewService creates a new service of type Tasker.
NewTask create a new task.
NewTaskFromConfig create a new task from config.
NewWorker creates a new worker.
RegisterHandler registers a handler for worker tasks.
RegisterWorker registers a worker.
WorkerSupport return true if worker support specified functionality.
# Constants
ID of service.
MessageAddTask indicates that task must be added to queue.
MessageModifyTask indicates that task must be modified.
MessageRemoveTask indicates that task must be removed from queue.
MessageReport indicates that task has something to say.
MessageStartTask indicates that task must be started.
MessageStopTask indicates that task must be stoped.
MessageTaskAdded indicates that task has been added to queue.
MessageTaskDone indicates that task has been done.
MessageTaskModified indicates that task has been modified.
MessageTaskNotModified indicates that task has not been modified.
MessageTaskNotStarted indicates that task has not been started.
MessageTaskRemoved indicates that task has been removed from queue.
MessageTaskStarted indicates that task has been started.
MessageTaskStoped indicates that task has been stoped.
MessageWorkerStart indicates that worker must be started.
MessageWorkerStarted indicates that worker started.
MessageWorkerStop indicates that worker must be stoped.
MessageWorkerStoped indicates that worker stoped.
ScopeGlobal indicates that message is visible globaly.
ScopeHandler indicates that message is visible only for handler.
ScopeTasker indicates that message is visible only for tasker and lower.
ScopeWorker indicates that message is visible only for worker and lower.
TaskStatusFail represents task that is failed.
TaskStatusInProgress represents task that is in work.
TaskStatusOver represents task that is over.
TaskStatusReady represents task that is ready do work.
TYPEDefaultWorker is a type id of default worker.
# Structs
Config defines RPC service config.
Message is simple message struct for comunicationg through channels.
Service is Worker service.
Task represents task.
WorkerConfig defines Worker config.