Add subsystems and clean up module dependencies

This commit is contained in:
Daniel
2020-04-01 17:14:33 +02:00
parent 279ab67c7e
commit 5523fcf0bd
10 changed files with 78 additions and 55 deletions

View File

@@ -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)
}