workers

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IWorkers

type IWorkers interface {
	eosc.IWorkers
	Del(id string) error
	//Check(id, profession, name, driverName string, body []byte) error
	Set(id, profession, name, driverName string, body []byte) error

	//RequiredCount(id string) int
	Reset(wdl []*eosc.WorkerConfig) error
}

type WorkerDatas

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

func NewTypedWorkers

func NewTypedWorkers() *WorkerDatas

func (*WorkerDatas) All

func (wd *WorkerDatas) All() []eosc.IWorker

func (*WorkerDatas) Del

func (wd *WorkerDatas) Del(id string) (eosc.IWorker, bool)

func (*WorkerDatas) Get

func (wd *WorkerDatas) Get(id string) (eosc.IWorker, bool)

func (*WorkerDatas) Set

func (wd *WorkerDatas) Set(id string, w eosc.IWorker)

type Workers

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

func NewWorkerManager

func NewWorkerManager(profession professions.IProfessions) *Workers

func (*Workers) Check

func (wm *Workers) Check(id, profession, name, driverName string, body []byte) error

func (*Workers) Del

func (wm *Workers) Del(id string) error

func (*Workers) Get

func (wm *Workers) Get(id string) (eosc.IWorker, bool)

func (*Workers) RequiredCount

func (wm *Workers) RequiredCount(id string) int

func (*Workers) Reset

func (wm *Workers) Reset(wdl []*eosc.WorkerConfig) error

func (*Workers) Set

func (wm *Workers) Set(id, profession, name, driverName string, body []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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