mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
move router to module New func
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user