change internals to internal

This commit is contained in:
Joel Wetzell
2025-11-21 07:35:41 -06:00
parent d1d00237b0
commit fe2a54d4cd
12 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,36 @@
package processing
import (
"context"
"fmt"
osc "github.com/jwetzell/osc-go"
)
type OSCMessageEncode struct {
config ProcessorConfig
}
func (o *OSCMessageEncode) Process(ctx context.Context, payload any) (any, error) {
payloadMessage, ok := payload.(osc.OSCMessage)
if !ok {
return nil, fmt.Errorf("osc.message.encode processor only accepts an OSCMessage")
}
bytes := payloadMessage.ToBytes()
return bytes, nil
}
func (o *OSCMessageEncode) Type() string {
return o.config.Type
}
func init() {
RegisterProcessor(ProcessorRegistration{
Type: "osc.message.encode",
New: func(config ProcessorConfig) (Processor, error) {
return &OSCMessageEncode{config: config}, nil
},
})
}