1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-17 04:30:03 +02:00

Adding api/message/msgpack

This commit is contained in:
Henrik Hautakoski 2023-04-25 16:54:25 +02:00
parent f3900bc262
commit 2e8c228076
5 changed files with 432 additions and 0 deletions

View file

@ -0,0 +1,18 @@
package msgpack
import (
"github.com/shamaton/msgpack/v2"
"github.com/eosswedenorg/thalos/api/message"
)
//go:generate go run github.com/shamaton/msgpackgen -v -input-file ../types.go -output-file msgpack.go
func init() {
RegisterGeneratedResolver()
message.RegisterCodec("msgpack", message.Codec{
Encoder: msgpack.Marshal,
Decoder: msgpack.Unmarshal,
})
}