master

package
v0.0.0-...-9bd2c4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2018 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

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 NewMaster

func NewMaster() *Master

func (*Master) Attach

func (m *Master) Attach() uint

func (*Master) BatchAttach

func (m *Master) BatchAttach(amount int) []uint

func (*Master) Close

func (m *Master) Close() bool

func (*Master) CountTasks

func (m *Master) CountTasks() []int

count the number of tasks that the are queuing in channel

func (*Master) CountWorkers

func (m *Master) CountWorkers() int

count the number of workers that are governed by the current master

func (*Master) Detach

func (m *Master) Detach(w *worker.Worker)

func (*Master) Done

func (m *Master) Done(t *task.Task) error

func (*Master) DoneMulti

func (m *Master) DoneMulti(ts map[int]*task.Task) error

func (*Master) Enqueue

func (m *Master) Enqueue(ts map[int]*task.Task) map[int]*task.TaskFuture

func (*Master) Launch

func (m *Master) Launch(ID uint) error

func (*Master) LaunchAll

func (m *Master) LaunchAll() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL