subsystems

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: GPL-3.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(id, name, description string, module *modules.Module, configKeySpace string, option *config.Option)

Register registers a new subsystem. The given option must be a bool option. Should be called in init() directly after the modules.Register() function. The config option must not yet be registered and will be registered for you. Pass a nil option to force enable.

func SetDatabaseKeySpace

func SetDatabaseKeySpace(keySpace string)

SetDatabaseKeySpace sets a key space where subsystem status

Types

type ModuleStatus

type ModuleStatus struct {
	Name string

	// status mgmt
	Enabled bool
	Status  uint8

	// failure status
	FailureStatus uint8
	FailureID     string
	FailureMsg    string
	// contains filtered or unexported fields
}

ModuleStatus describes the status of a module.

type Subsystem

type Subsystem struct {
	record.Base
	sync.Mutex

	ID          string
	Name        string
	Description string

	Modules       []*ModuleStatus
	FailureStatus uint8 // summary: worst status

	ToggleOptionKey string

	ExpertiseLevel uint8 // copied from toggleOption
	ReleaseLevel   uint8 // copied from toggleOption

	ConfigKeySpace string
	// contains filtered or unexported fields
}

Subsystem describes a subset of modules that represent a part of a service or program to the user.

func (*Subsystem) Save

func (sub *Subsystem) Save()

Save saves the Subsystem Status to the database.

Jump to

Keyboard shortcuts

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