codecService

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 2 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