codecService

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE_CODEC_JSON     = "json"
	TYPE_CODEC_PROTOBUF = "protobuf"
)

Variables

This section is empty.

Functions

func GetCodecType

func GetCodecType() string

func SetCodecType

func SetCodecType(t string)

Change codec type in the main

Types

type Codec

type Codec interface {
	// must goroutine safe
	Unmarshal(obj interface{}, data []byte) error
	// must goroutine safe
	Marshal(msg interface{}) ([]byte, error)
}

func GetCodecService

func GetCodecService() Codec

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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