Packages

The Elixir implementation of gRPC

Current section

Files

Jump to
grpc_update lib grpc codec proto.ex
Raw

lib/grpc/codec/proto.ex

defmodule GRPC.Codec.Proto do
@behaviour GRPC.Codec
def name() do
"proto"
end
def encode(struct) do
Protobuf.Encoder.encode(struct)
end
def decode(binary, module) do
Protobuf.Decoder.decode(binary, module)
end
end