Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsloughter/grpcbox_plugin
Rebar3 plugin for generating grpcbox behaviours
https://github.com/tsloughter/grpcbox_plugin
erlang grpc grpc-gateway rebar3 rebar3-plugin
Last synced: 3 months ago
JSON representation
Rebar3 plugin for generating grpcbox behaviours
- Host: GitHub
- URL: https://github.com/tsloughter/grpcbox_plugin
- Owner: tsloughter
- License: apache-2.0
- Created: 2017-12-02T20:00:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-26T12:08:17.000Z (over 1 year ago)
- Last Synced: 2024-09-20T11:48:02.890Z (4 months ago)
- Topics: erlang, grpc, grpc-gateway, rebar3, rebar3-plugin
- Language: Erlang
- Size: 47.9 KB
- Stars: 10
- Watchers: 3
- Forks: 24
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
grpcbox Plugin
=====A rebar3 plugin for generating a behaviour per grpc service, for use with [grpcbox](https://github.com/tsloughter/grpcbox).
Build
-----```
$ rebar3 compile
```Use
---Add the plugin to your rebar config:
```
{deps, [grpcbox]}.{grpc, [{protos, "proto"},
{gpb_opts, [{module_name_suffix, "_pb"}]}]}.{plugins, [grpcbox_plugin]}.
```Currently `grpcbox` and this plugin are a bit picky and the `gpb` options will always include `[use_packages, maps, type_specs, strings_as_binaries, {i, "."}, {o, "src"}]`.
Assuming the `proto` directory of your application has the `route_guide.proto` found in this repo, `test/grpcbox_SUITE_data/route_guide.proto`, the output from running the plugin will be:
```
$ rebar3 grpc gen
===> Writing src/route_guide_pb.erl
===> Writing src/grpcbox_route_guide_behaviour.erl
```