codec

package module
v0.0.0-...-3eae65d Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 3 Imported by: 1

README

codec

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessage

func GetMessage(router interface{}) interface{}

func RegisterCodec

func RegisterCodec(name string, codec Codec)

func RegisterMessage

func RegisterMessage(router interface{}, datePtr interface{})

Types

type Codec

type Codec interface {
	Marshal(router string, dataPtr interface{}, err error) ([]byte, error)
	Unmarshal([]byte) (int, *MsgPack, error)
	ToString(interface{}) string
}

func GetCodec

func GetCodec(name string) Codec

type MsgPack

type MsgPack struct {
	Router  interface{}
	DataPtr interface{}
	Err     error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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