Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalJSON ¶
func UnmarshalJSON ¶
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 }
Codec defines the interface Transport 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 EncoderFunc ¶
type EncoderFunc func(v interface{}) error
EncoderFunc adapts an encoder function into Encoder
func NewEncoderFunc ¶
func NewEncoderFunc(writer io.Writer) EncoderFunc
Click to show internal directories.
Click to hide internal directories.