rainbond: github.com/goodrain/rainbond/node/core/worker Index | Files

package worker

import "github.com/goodrain/rainbond/node/core/worker"

Index

Package Files

manager.go taskgroupworker.go taskworker.go

type Manager Uses

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

Manager 工作器管理

func NewManager Uses

func NewManager() *Manager

NewManager 新建Manager

func (*Manager) AddWorker Uses

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

AddWorker 添加worker

func (*Manager) NewTaskGroupWorker Uses

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

NewTaskGroupWorker 创建worker

func (*Manager) NewTaskWorker Uses

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

NewTaskWorker 创建worker

func (*Manager) RemoveWorker Uses

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

RemoveWorker 移除worker

func (*Manager) Start Uses

func (m *Manager) Start() error

Start 启动

func (*Manager) Stop Uses

func (m *Manager) Stop() error

Stop 关闭

type Worker Uses

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

Worker 工作器

Package worker imports 3 packages (graph). Updated 2018-05-01. Refresh now. Tools for package owners.