package
Version:
v0.4.2
Opens a new window with list of versions in this module.
Published: Dec 20, 2022
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Register 注册一个Code, 按照定义的scheme获取Codec
从v0.4.0版本开始LittleRpc在Codec中使用普通map来管理
type Codec interface {
Scheme() string
Marshal(v interface{}) ([]byte, error)
Unmarshal(data []byte, v interface{}) error
}
Get 根据Scheme获取Codec, 如果Codec不存在, 那么返回的Codec == nil
从v0.4.0版本开始LittleRpc在Codec中使用普通map来管理
Source Files
¶
Click to show internal directories.
Click to hide internal directories.