Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Rebar3 plugin for generating grpcbox behaviours

License

Notifications You must be signed in to change notification settings

coretech/grpcbox_plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grpcbox Plugin

A rebar3 plugin for generating a behaviour per grpc service, for use with 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

About

Rebar3 plugin for generating grpcbox behaviours

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Erlang 100.0%