Add subsystems and clean up module dependencies
This commit is contained in:
18
core/core.go
18
core/core.go
@@ -3,14 +3,28 @@ package core
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/safing/portbase/modules/subsystems"
|
||||
|
||||
"github.com/safing/portbase/modules"
|
||||
)
|
||||
|
||||
var (
|
||||
module *modules.Module
|
||||
)
|
||||
|
||||
func init() {
|
||||
modules.Register("core", nil, startCore, nil, "database", "config", "api", "random")
|
||||
module = modules.Register("core", nil, start, nil, "database", "config", "api", "random", "notifications", "subsystems", "ui", "updates", "status")
|
||||
subsystems.Register(
|
||||
"core",
|
||||
"Core",
|
||||
"Base Structure and System Integration",
|
||||
module,
|
||||
"config:core/",
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
func startCore() error {
|
||||
func start() error {
|
||||
if err := startPlatformSpecific(); err != nil {
|
||||
return fmt.Errorf("failed to start plattform-specific components: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user