worker

package
v5.1.10-release+incomp... Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: LGPL-3.0 Imports: 3 Imported by: 0

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 工作器

Jump to

Keyboard shortcuts

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