From 8bb60a3a3c8d94f1af9c8b63300ae1802196ac3a Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 27 Nov 2025 09:06:59 -0500 Subject: [PATCH] add some context for output to potentially use later --- route.go | 6 +++--- router.go | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/route.go b/route.go index 79482be..ed179f9 100644 --- a/route.go +++ b/route.go @@ -59,9 +59,9 @@ func (r *Route) HandleInput(sourceId string, payload any) error { return nil } } - return r.HandleOutput(payload) + return r.HandleOutput(sourceId, payload) } -func (r *Route) HandleOutput(payload any) error { - return r.router.HandleOutput(r.Output, payload) +func (r *Route) HandleOutput(sourceId string, payload any) error { + return r.router.HandleOutput(sourceId, r.Output, payload) } diff --git a/router.go b/router.go index 4acf029..24106c6 100644 --- a/router.go +++ b/router.go @@ -157,9 +157,10 @@ func (r *Router) HandleInput(sourceId string, payload any) []RoutingError { return routingErrors } -func (r *Router) HandleOutput(destinationId string, payload any) error { +func (r *Router) HandleOutput(sourceId string, destinationId string, payload any) error { for _, moduleInstance := range r.ModuleInstances { if moduleInstance.Id() == destinationId { + slog.Debug("routing", "source", sourceId, "destination", destinationId, "payload", payload) return moduleInstance.Output(payload) } }