Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { // Marshal returns the wire format of v. Marshal(v interface{}) ([]byte, error) // Unmarshal parses the wire format into v. Unmarshal(data []byte, v interface{}) error // String returns the name of the Codec implementation. The returned // string will be used as part of content type in transmission. String() string }
Codec defines the interface gRPC uses to encode and decode messages. Note that implementations of this interface must be thread safe; a Codec's methods can be called from concurrent goroutines.
type ProtoCodec ¶
type ProtoCodec struct { }
protoCodec is a Codec implementation with protobuf. It is the default codec for gRPC.
func (ProtoCodec) Marshal ¶
func (p ProtoCodec) Marshal(v interface{}) ([]byte, error)
func (ProtoCodec) String ¶
func (ProtoCodec) String() string
func (ProtoCodec) Unmarshal ¶
func (p ProtoCodec) Unmarshal(data []byte, v interface{}) error
Click to show internal directories.
Click to hide internal directories.