rename processing to processor

This commit is contained in:
Joel Wetzell
2025-12-07 10:41:14 -06:00
parent 2e7feede28
commit 0bd43ca0c3
36 changed files with 159 additions and 115 deletions

View File

@@ -0,0 +1,31 @@
package processor
import (
"context"
"fmt"
"log/slog"
"github.com/jwetzell/showbridge-go/internal/config"
)
type DebugLog struct {
config config.ProcessorConfig
}
func (dl *DebugLog) Process(ctx context.Context, payload any) (any, error) {
slog.Debug("debug.log", "payload", payload, "payloadType", fmt.Sprintf("%T", payload))
return payload, nil
}
func (dl *DebugLog) Type() string {
return dl.config.Type
}
func init() {
RegisterProcessor(ProcessorRegistration{
Type: "debug.log",
New: func(config config.ProcessorConfig) (Processor, error) {
return &DebugLog{config: config}, nil
},
})
}