manager

package
v0.0.0-...-6f04ce8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package manager is the core module in Aqua, deals with config loading, sub-card's worker setting and getting

Index

Constants

View Source
const DBVER string = "1.0.0"

DBVER is DB File Version

Variables

This section is empty.

Functions

func GetPipeInfo

func GetPipeInfo(w io.Writer)

GetPipeInfo return a Pipesvr info

Types

type DB

type DB struct {

	// Version should be used to check DB's compatibility
	Version string

	// Store contains all path params
	Params map[string]Params
	// contains filtered or unexported fields
}

DB contains all path' config. It's degsinged to be easily exported to file (like JSON). set() and get() are not thread-safe, it's caller's responsibility to ensure that. It's designed to copy params in set() and get()

type Params

type Params map[string]interface{}

Params is the main data struct used to set and get path setttings

type Path

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

Path is the main struct for control sub-cards

func (*Path) Create

func (ep *Path) Create(dir string, file string, need []string) error

Create does registing, and loads cfg from file

func (*Path) Get

func (ep *Path) Get(ID int) (Params, error)

Get queries data

func (*Path) GetAllStatus

func (ep *Path) GetAllStatus() map[int]bool

GetAllStatus return all status

func (*Path) GetWorkers

func (ep *Path) GetWorkers() []string

GetWorkers gets all workers registered under a path

func (*Path) Set

func (ep *Path) Set(ID int, params Params) error

Set processes data settings

type Workers

type Workers []driver.Worker

Workers store all workers registered by cards

Jump to

Keyboard shortcuts

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