mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-05-07 10:05:54 +00:00
work towards decoupling api from router
This commit is contained in:
@@ -5,3 +5,8 @@ type Config struct {
|
||||
Modules []ModuleConfig `json:"modules"`
|
||||
Routes []RouteConfig `json:"routes"`
|
||||
}
|
||||
|
||||
type Configurable interface {
|
||||
UpdateConfig(newConfig Config, triggerChangeChannel bool) (error, []ModuleError, []RouteError)
|
||||
GetRunningConfig() Config
|
||||
}
|
||||
|
||||
@@ -5,3 +5,9 @@ type ModuleConfig struct {
|
||||
Type string `json:"type"`
|
||||
Params Params `json:"params,omitempty"`
|
||||
}
|
||||
|
||||
type ModuleError struct {
|
||||
Index int `json:"index"`
|
||||
Config ModuleConfig `json:"config"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
@@ -4,3 +4,9 @@ type RouteConfig struct {
|
||||
Input string `json:"input"`
|
||||
Processors []ProcessorConfig `json:"processors"`
|
||||
}
|
||||
|
||||
type RouteError struct {
|
||||
Index int `json:"index"`
|
||||
Config RouteConfig `json:"config"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user