mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
18 lines
371 B
Go
18 lines
371 B
Go
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,
|
|
})
|
|
}
|