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

@@ -5,6 +5,7 @@ import (
"fmt"
"time"
"github.com/jwetzell/showbridge-go/internal/common"
"github.com/jwetzell/showbridge-go/internal/config"
)
@@ -13,9 +14,9 @@ type TimeSleep struct {
Duration time.Duration
}
func (ts *TimeSleep) Process(ctx context.Context, payload any) (any, error) {
func (ts *TimeSleep) Process(ctx context.Context, wrappedPayload common.WrappedPayload) (common.WrappedPayload, error) {
time.Sleep(ts.Duration)
return payload, nil
return wrappedPayload, nil
}
func (ts *TimeSleep) Type() string {