View Source GRPC.Codec behaviour (grpc v0.9.0)
Contains code to serialize a deserialize the message.
Summary
Callbacks
Name is identity of the codec, which will be suffix after content-type "application/grpc+" such as "proto".
This function is invoked whenever it is defined after the protobuf message has been transformed into a gRPC payload.
This function is invoked before the gRPC payload is transformed into a protobuf message whenever it is defined.
Callbacks
@callback name() :: String.t()
Name is identity of the codec, which will be suffix after content-type "application/grpc+" such as "proto".
This function is invoked whenever it is defined after the protobuf message has been transformed into a gRPC payload.
This can be used to apply a transform over the gRPC message before sending it.
For instance grpc-web using the application/grpc-web-text
content type requires the message to be Base64-encoded, so a server sending messages using grpc-web-text will be required to
do a Base64 encode on the payload before sending the gRPC message.
This function is invoked before the gRPC payload is transformed into a protobuf message whenever it is defined.
This can be used to apply a transform over the gRPC message before decoding it. For instance grpc-web using the application/grpc-web-text
content type requires the message to be Base64-encoded, so a server receving messages using grpc-web-text will be required to
do a Base64 decode on the payload before decoding the gRPC message.