codec-mus-stream
May 6, 2026 ยท View on GitHub
codec-mus-stream provides a MUS-based streaming codec for cmd-stream.
How To
import (
"github.com/cmd-stream/cmd-stream-go/core"
cdcmuss "github.com/cmd-stream/codec-mus-stream-go"
)
var (
serverCodec = cdcmuss.NewServerCodec(cmds.CmdMUS, results.ResultMUS)
clientCodec = cdcmuss.NewClientCodec(cmds.CmdMUS, results.ResultMUS)
)
Here, cmds.CmdMUS is a MUS serializer for the core.Cmd interface, and
results.ResultMUS is a MUS serializer for the core.Result interface.
Example
See the hello-world
example for a full demonstration of codec-mus-stream.
Fuzz Testing
This library represents a tiny wrapper around CmdMUS and ResultMUS serializers.
To assist with robustness testing, codec_fuzz_test.go
demonstrates how to fuzz test your custom serializers in combination with the
codec.
To run fuzz tests:
./fuzz.sh 1m