mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
reorder functions
This commit is contained in:
16
route.go
16
route.go
@@ -26,14 +26,6 @@ type ProcessorRoute struct {
|
|||||||
output string
|
output string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *ProcessorRoute) Input() string {
|
|
||||||
return r.input
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *ProcessorRoute) Output() string {
|
|
||||||
return r.output
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewRoute(config config.RouteConfig) (Route, error) {
|
func NewRoute(config config.RouteConfig) (Route, error) {
|
||||||
processors := []processing.Processor{}
|
processors := []processing.Processor{}
|
||||||
|
|
||||||
@@ -55,6 +47,14 @@ func NewRoute(config config.RouteConfig) (Route, error) {
|
|||||||
return &ProcessorRoute{input: config.Input, processors: processors, output: config.Output}, nil
|
return &ProcessorRoute{input: config.Input, processors: processors, output: config.Output}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *ProcessorRoute) Input() string {
|
||||||
|
return r.input
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *ProcessorRoute) Output() string {
|
||||||
|
return r.output
|
||||||
|
}
|
||||||
|
|
||||||
func (r *ProcessorRoute) HandleInput(sourceId string, payload any, router *Router) error {
|
func (r *ProcessorRoute) HandleInput(sourceId string, payload any, router *Router) error {
|
||||||
var err error
|
var err error
|
||||||
for _, processor := range r.processors {
|
for _, processor := range r.processors {
|
||||||
|
|||||||
Reference in New Issue
Block a user