Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOption ¶
type ClientOption func(*ClientSettings)
ClientOption 客户端选项
func WithClientJsonMarshalBinary ¶ added in v0.4.1
func WithClientJsonMarshalBinary() ClientOption
WithClientJsonMarshalBinary 使用 json.Marshal
func WithClientMarshalBinary ¶
func WithClientMarshalBinary(f func(any) ([]byte, error)) ClientOption
WithClientMarshalBinary 使用指定序列化
type ClientSettings ¶
ClientSettings 客户端配置
func NewClientSettings ¶
func NewClientSettings() *ClientSettings
NewClientSettings 新建配置, 默认使用 proto.Marshal
type HandlerOption ¶
type HandlerOption func(*HandlerSettings)
HandlerOption 处理器选项
func WithHandlerJsonUnmarshalBinary ¶ added in v0.4.1
func WithHandlerJsonUnmarshalBinary() HandlerOption
WithHandlerUnmarshalBinary 使用 json.Unmarshal
func WithHandlerUnmarshalBinary ¶
func WithHandlerUnmarshalBinary(f func([]byte, any) error) HandlerOption
WithHandlerUnmarshalBinary 指定反序列化
type HandlerSettings ¶
type HandlerSettings struct { // UnmarshalBinary parses the binary data and stores the result // in the value pointed to by v. UnmarshalBinary func([]byte, any) error }
HandlerSettings 处理器配置
func NewHandlerSettings ¶
func NewHandlerSettings() *HandlerSettings
NewHandlerSettings 新建处理器选项, 默认使用 proto.Unmarshal
Click to show internal directories.
Click to hide internal directories.