mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
cleanup route interface
This commit is contained in:
@@ -28,7 +28,6 @@ type Route interface {
|
|||||||
Input() string
|
Input() string
|
||||||
Output() string
|
Output() string
|
||||||
HandleInput(ctx context.Context, sourceId string, payload any, router RouteIO) error
|
HandleInput(ctx context.Context, sourceId string, payload any, router RouteIO) error
|
||||||
HandleOutput(ctx context.Context, sourceId string, payload any, router RouteIO) error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProcessorRoute struct {
|
type ProcessorRoute struct {
|
||||||
@@ -78,9 +77,5 @@ func (r *ProcessorRoute) HandleInput(ctx context.Context, sourceId string, paylo
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return r.HandleOutput(ctx, sourceId, payload, router)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *ProcessorRoute) HandleOutput(ctx context.Context, sourceId string, payload any, router RouteIO) error {
|
|
||||||
return router.HandleOutput(sourceId, r.output, payload)
|
return router.HandleOutput(sourceId, r.output, payload)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user