move router to module New func

This commit is contained in:
Joel Wetzell
2025-12-06 23:00:45 -06:00
parent 8d8347fc4d
commit 9a06949b5b
16 changed files with 30 additions and 93 deletions

View File

@@ -16,14 +16,13 @@ type ModuleError struct {
type Module interface {
Id() string
Type() string
RegisterRouter(*Router)
Run() error
Output(any) error
}
type ModuleRegistration struct {
Type string `json:"type"`
New func(config.ModuleConfig) (Module, error)
New func(config.ModuleConfig, *Router) (Module, error)
}
func RegisterModule(mod ModuleRegistration) {