switch modules to accept an InputHandler instead of the full router

This commit is contained in:
Joel Wetzell
2026-05-20 21:03:41 -05:00
parent be0b1c4a5f
commit 4cedd58a76
31 changed files with 301 additions and 297 deletions
+3 -3
View File
@@ -20,12 +20,12 @@ type RouterInput struct {
func (ro *RouterInput) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) {
payload := wrappedPayload.Payload
if wrappedPayload.Router == nil {
if wrappedPayload.InputHandler == nil {
wrappedPayload.End = true
return wrappedPayload, errors.New("router.input no router found")
return wrappedPayload, errors.New("router.input no input handler found")
}
_, err := wrappedPayload.Router.HandleInput(ctx, ro.SourceId, payload)
_, err := wrappedPayload.InputHandler(ctx, ro.SourceId, payload)
if err != nil {
wrappedPayload.End = true