codec

package
v0.0.0-...-e14b3c0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMessageSize = 1024 * 1024 * 4 // 4Mb

)

Variables

View Source
var (
	DefaultQueryUnmarshaler = schema.NewDecoder()
)
View Source
var (
	ErrInvalidMessage = errors.New("invalid message")
)

Functions

func Marshal

func Marshal(protocol string, b interface{}) ([]byte, error)

func RegQueryUnmarshaler

func RegQueryUnmarshaler(endpoint string, d *schema.Decoder)

func StreamRead

func StreamRead(r io.Reader) (uint8, []byte, error)

StreamRead 流式读

func StreamWrite

func StreamWrite(cf uint8, buf []byte, w io.Writer) error

StreamWrite 流式写

func Unmarshal

func Unmarshal(protocol string, buff []byte, payload *micro.Response) error

func UnmarshalQuery

func UnmarshalQuery(endpoint string, src map[string][]string, dst interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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