message

package
v0.0.0-...-f683eec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Marshal(v interface{}) ([]byte, error)
	Unmarshal(data []byte, v interface{}) error
}

Codec use for marshal and unmarshal message

var JSONCodec Codec = new(jsonCodec)

MessageJSONCodec json format codec

var ProtobufCodec Codec = new(pbCodec)

ProtobufCodec google protobuf codec

var WalleCodec Codec = new(wpbCodec)

WalleCodec walle proto codec

type Message

type Message interface {
	MarshalObject() (data []byte, err error)
	UnmarshalObject(data []byte) (err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL