worker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: GPL-3.0 Imports: 3 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 {
	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