diff --git a/internal/common/context.go b/internal/common/context.go new file mode 100644 index 0000000..c49cbc0 --- /dev/null +++ b/internal/common/context.go @@ -0,0 +1,8 @@ +package common + +type contextKey string + +const RouterContextKey contextKey = contextKey("router") +const SourceContextKey contextKey = contextKey("source") +const ModulesContextKey contextKey = contextKey("modules") +const SenderContextKey contextKey = contextKey("sender") diff --git a/internal/common/common.go b/internal/common/routing.go similarity index 56% rename from internal/common/common.go rename to internal/common/routing.go index 3725a05..70bd17e 100644 --- a/internal/common/common.go +++ b/internal/common/routing.go @@ -2,13 +2,6 @@ package common import "context" -type contextKey string - -const RouterContextKey contextKey = contextKey("router") -const SourceContextKey contextKey = contextKey("source") -const ModulesContextKey contextKey = contextKey("modules") -const SenderContextKey contextKey = contextKey("sender") - type RouteIO interface { HandleInput(ctx context.Context, sourceId string, payload any) (bool, []RouteIOError) HandleOutput(ctx context.Context, destinationId string, payload any) error