Documentation ¶
Index ¶
- Constants
- func EnableModules(enablingModules []string, disableModules []string, flag EnableFlag) error
- func GetService() *dbusutil.Service
- func Register(m Module)
- func SetLogLevel(pri log.Priority)
- func SetService(s *dbusutil.Service)
- func StartAll()
- func StopAll()
- func ToggleLogDebug(enabled bool)
- type DAGBuilder
- type EnableError
- type EnableFlag
- type Loader
- func (l *Loader) AddModule(m Module)
- func (l *Loader) DeleteModule(name string)
- func (l *Loader) EnableModules(enablingModules []string, disableModules []string, flag EnableFlag) error
- func (l *Loader) GetModule(name string) Module
- func (l *Loader) List() []Module
- func (l *Loader) SetLogLevel(pri log.Priority)
- func (l *Loader) WaitDependencies(module Module)
- type Module
- type ModuleBase
- type ModuleImpl
- type Modules
Constants ¶
View Source
const ( ErrorNoDependencies int = iota ErrorCircleDependencies ErrorMissingModule ErrorInternalError ErrorConflict )
Variables ¶
This section is empty.
Functions ¶
func EnableModules ¶
func EnableModules(enablingModules []string, disableModules []string, flag EnableFlag) error
func GetService ¶
func SetLogLevel ¶
func SetService ¶
func ToggleLogDebug ¶
func ToggleLogDebug(enabled bool)
Types ¶
type DAGBuilder ¶
type DAGBuilder struct {
// contains filtered or unexported fields
}
func NewDAGBuilder ¶
func NewDAGBuilder(loader *Loader, enablingModules []string, disableModules []string, flag EnableFlag) *DAGBuilder
type EnableError ¶
func (*EnableError) Error ¶
func (e *EnableError) Error() string
type EnableFlag ¶
type EnableFlag int
const ( EnableFlagNone EnableFlag = 1 << iota EnableFlagIgnoreMissingModule EnableFlagForceStart )
func (EnableFlag) HasFlag ¶
func (flags EnableFlag) HasFlag(flag EnableFlag) bool
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) DeleteModule ¶
func (*Loader) EnableModules ¶
func (l *Loader) EnableModules(enablingModules []string, disableModules []string, flag EnableFlag) error
func (*Loader) SetLogLevel ¶
func (*Loader) WaitDependencies ¶
type Module ¶
type ModuleBase ¶
type ModuleBase struct {
// contains filtered or unexported fields
}
func NewModuleBase ¶
func NewModuleBase(name string, impl ModuleImpl, logger *log.Logger) *ModuleBase
func (*ModuleBase) Enable ¶
func (d *ModuleBase) Enable(enable bool) error
func (*ModuleBase) IsEnable ¶
func (d *ModuleBase) IsEnable() bool
func (*ModuleBase) LogLevel ¶
func (d *ModuleBase) LogLevel() log.Priority
func (*ModuleBase) Name ¶
func (d *ModuleBase) Name() string
func (*ModuleBase) SetLogLevel ¶
func (d *ModuleBase) SetLogLevel(pri log.Priority)
func (*ModuleBase) WaitEnable ¶
func (d *ModuleBase) WaitEnable()
type ModuleImpl ¶
Click to show internal directories.
Click to hide internal directories.