mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 13:25:40 +00:00
wrap payload for all processors
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user