Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager 工作器管理

func NewManager

func NewManager() *Manager

NewManager 新建Manager

func (*Manager) AddWorker

func (m *Manager) AddWorker(worker Worker) error

AddWorker 添加worker

func (*Manager) NewTaskGroupWorker

func (m *Manager) NewTaskGroupWorker(taskgroup *model.TaskGroup) Worker

NewTaskGroupWorker 创建worker

func (*Manager) NewTaskWorker

func (m *Manager) NewTaskWorker(task *model.Task) Worker

NewTaskWorker 创建worker

func (*Manager) RemoveWorker

func (m *Manager) RemoveWorker(worker Worker) error

RemoveWorker 移除worker

func (*Manager) Start

func (m *Manager) Start() error

Start 启动

func (*Manager) Stop

func (m *Manager) Stop() error

Stop 关闭

type Worker

type Worker interface {
	Start()
	Stop() error
	Result()
}

Worker 工作器