wrap payload for all processors

This commit is contained in:
Joel Wetzell
2026-03-16 17:05:49 -05:00
parent b6c1c5c600
commit f273aedbc6
76 changed files with 674 additions and 486 deletions

View File

@@ -0,0 +1,26 @@
package common
import (
"context"
)
type WrappedPayload struct {
Payload any
Modules any
Sender any
End bool
}
func GetWrappedPayload(ctx context.Context, payload any) WrappedPayload {
templateData := WrappedPayload{Payload: payload}
modules := ctx.Value(ModulesContextKey)
if modules != nil {
templateData.Modules = modules
}
sender := ctx.Value(SenderContextKey)
if sender != nil {
templateData.Sender = sender
}
return templateData
}