Documentation ¶
Index ¶
- Constants
- func NewTaskExecuteMessage(name string, args []byte, payloadType string) message.Message
- func NewTaskExecutedMessage(id xid.ID, result any, err error) message.Message
- func NewTaskExecutingMessage(manifestID, futureID xid.ID) message.Message
- func NewWorkerAnnounceMessage(workerID xid.ID, tasks ...string) message.Message
- type Controller
- type ExecuteMessage
- type ExecutedMessage
- type ExecutingMessage
- type Manifest
- type Options
- type Task
- type Worker
- type WorkerAnnounceMessage
- type WorkerInfo
- type WorkerLoad
Constants ¶
View Source
const ( MWorkerAnnounce = "wk.work.announce" MTaskExecute = "wk.task.execute" MTaskExecuting = "wk.task#executing" MTaskExecuted = "wk.task#executed" )
Variables ¶
This section is empty.
Functions ¶
func NewTaskExecuteMessage ¶
func NewTaskExecutedMessage ¶
func NewTaskExecutingMessage ¶
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(bus message.Bus, kv kv.KV) *Controller
func (*Controller) Dispatch ¶
func (c *Controller) Dispatch(ctx context.Context, manifest Manifest) error
func (*Controller) Producer ¶
func (c *Controller) Producer() async.Manifest
func (*Controller) Workers ¶
func (c *Controller) Workers() []WorkerInfo
type ExecuteMessage ¶
type ExecuteMessage struct {
Manifest
}
type Manifest ¶
type WorkerAnnounceMessage ¶
Click to show internal directories.
Click to hide internal directories.