An implementation of a gRPC server and client in Erlang. HTTP/2 based RPC.
NOTE: The prototypes for this repository are from Bluehouse-Technology/grpc and tsloughter/grpcbox Many thanks to these two repositories for helping me with the implementation :)
The application is built from rebar3, so you can introduce it in your rebar.config.
In addition, you need to introduce grpc_plugin plugin to generate client-side
and server-side code from the .proto file.
So a regular rebar.config would look something like the following:
{plugins,
[{grpc_plugin, {git, "https://github.com/HJianBo/grpc_plugin", {tag, "v0.10.1"}}}
]}.
{deps,
[{grpc, {git, "https://github.com/emqx/grpc", {branch, "master"}}}
]}.
%% Configurations for grpc_plugin
{grpc,
[ {type, all}
, {protos, ["priv/"]}
, {out_dir, "src/"}
, {gpb_opts, []} %% The gpb compile options, see: https://github.com/tomas-abrahamsson/gpb/blob/master/src/gpb_compile.erl#L120
]}.
%% Integrate grpc_plugin generation/clean into rebar3's complie/clean
{provider_hooks,
[{pre, [{compile, {grpc, gen}},
{clean, {grpc, clean}}]}
]}.
For more detailed examples, you can see the examples/route_guide project.
Apache 2.0
Erlang
99.6%
An implementation of a gRPC server and client in Erlang. HTTP/2 based RPC.
NOTE: The prototypes for this repository are from Bluehouse-Technology/grpc and tsloughter/grpcbox Many thanks to these two repositories for helping me with the implementation :)
The application is built from rebar3, so you can introduce it in your rebar.config.
In addition, you need to introduce grpc_plugin plugin to generate client-side
and server-side code from the .proto file.
So a regular rebar.config would look something like the following:
{plugins,
[{grpc_plugin, {git, "https://github.com/HJianBo/grpc_plugin", {tag, "v0.10.1"}}}
]}.
{deps,
[{grpc, {git, "https://github.com/emqx/grpc", {branch, "master"}}}
]}.
%% Configurations for grpc_plugin
{grpc,
[ {type, all}
, {protos, ["priv/"]}
, {out_dir, "src/"}
, {gpb_opts, []} %% The gpb compile options, see: https://github.com/tomas-abrahamsson/gpb/blob/master/src/gpb_compile.erl#L120
]}.
%% Integrate grpc_plugin generation/clean into rebar3's complie/clean
{provider_hooks,
[{pre, [{compile, {grpc, gen}},
{clean, {grpc, clean}}]}
]}.
For more detailed examples, you can see the examples/route_guide project.
Apache 2.0
Erlang
99.6%