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.