worker

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_NAME = "proxy.db"
)

Variables

This section is empty.

Functions

func New

func New() *worker

Types

type CommandInfo

type CommandInfo struct {
	Mpu    string `json:"mpu"`
	Name   string `json:"name"`
	Worker string `json:"worker"`
}

type Worker

type Worker interface {
	Close() error
	DelWorker(string) error
	AddWorker(*WorkerInfo) error
	ChgWorker(*WorkerInfo) error
	ListWorkers() ([]*WorkerInfo, error)
	GetWorker(string) (*WorkerInfo, error)
}

type WorkerInfo

type WorkerInfo struct {
	Mpu      string        `json:"mpu"`
	Name     string        `json:"name"`
	Agent    string        `json:"agent"`
	Commands []CommandInfo `json:"commands"`
}

Jump to

Keyboard shortcuts

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