Documentation ¶
Index ¶
- type Master
- func (m *Master) Attach() uint
- func (m *Master) BatchAttach(amount int) []uint
- func (m *Master) Close() bool
- func (m *Master) CountTasks() []int
- func (m *Master) CountWorkers() int
- func (m *Master) Detach(w *worker.Worker)
- func (m *Master) Done(t *task.Task) error
- func (m *Master) DoneMulti(ts map[int]*task.Task) error
- func (m *Master) Enqueue(ts map[int]*task.Task) map[int]*task.TaskFuture
- func (m *Master) Launch(ID uint) error
- func (m *Master) LaunchAll() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Master ¶
type Master struct { Count uint List map[uint]*worker.Worker BaseTasks chan *task.TaskFuture LowTasks chan *task.TaskFuture MediumTasks chan *task.TaskFuture HighTasks chan *task.TaskFuture UrgentTasks chan *task.TaskFuture }
func (*Master) BatchAttach ¶
func (*Master) CountTasks ¶
count the number of tasks that the are queuing in channel
func (*Master) CountWorkers ¶
count the number of workers that are governed by the current master
Click to show internal directories.
Click to hide internal directories.