Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDecoder ¶
RegisterDecoder registers the provided Decoder with specific content types for use with all Transport clients and servers.
func RegisterEncoder ¶
RegisterEncoder registers the provided Encoder with specific content types for use with all Transport clients and servers.
Types ¶
type Decoder ¶
type Decoder interface { // Unmarshal parses the wire format into v. Unmarshal(data []byte, v interface{}) error }
Decoder defines the interface Transport uses to decode messages. Note that implementations of this interface must be thread safe; a Decoder's methods can be called from concurrent goroutines.
func GetDecoders ¶
GetDecoders gets registered Decoders by content-type, or none if no Decoder is registered for the content-type.
type Encoder ¶
type Encoder interface { // Marshal returns the wire format of v. Marshal(v interface{}) ([]byte, error) }
Encoder defines the interface Transport uses to encode messages. Note that implementations of this interface must be thread safe; a Encoder's methods can be called from concurrent goroutines.
func GetEncoders ¶
GetEncoders gets registered Encoders by content-type, or none if no Encoder is registered for the content-type.