Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { // DecodeRequest converts a proto message to a Go value. // It is designed to be used at the server side. DecodeRequest(pb proto.Message, out interface{}) error // EncodeResponse converts a Go value to a proto message. // It is designed to be used at the server side. EncodeResponse(in interface{}, pb proto.Message) error }
Codec is a series of codecs (encoders and decoders) for gRPC requests and responses.
type DefaultCodecs ¶
func NewDefaultCodecs ¶
func NewDefaultCodecs(d Codec, namedCodecs ...NamedCodec) *DefaultCodecs
func (*DefaultCodecs) EncodeDecoder ¶
func (dc *DefaultCodecs) EncodeDecoder(name string) Codec
type NamedCodec ¶
NamedCodec holds a codec and its corresponding operation name.
func Op ¶
func Op(name string, codec Codec) NamedCodec
Op is a shortcut for creating an instance of NamedCodec.
Click to show internal directories.
Click to hide internal directories.