Protein v0.7.0 Protein.RouterAPI View Source
Macros for defining a list of services and transport options.
Link to this section Summary
Functions
Attaches a service inferring its options from given proto name
Attaches a service to the client module with a customized config
Specifies a transport adapter for the RPC calls along with its options
Link to this section Functions
Attaches a service inferring its options from given proto name.
Supports either atom or binary name. Check out moduledoc for Protein.Client
for more info.
Attaches a service to the client module with a customized config.
Options
proto
: options passed toProtobuf
, usually[from: "some/proto/file.proto"]
service_name
: string identifier of the service; defaults to proto file’s root nameproto_mod
: base module that hosts the proto structures; defaults to camelized service name nested in the client/server modulerequest_mod
: request struct module; defaults toRequest
structure nested inproto_mod
moduleresponse_mod
: response struct module; defaults toResponse
structure nested inproto_mod
service_mod
: mock module; defaults toproto_mod
suffixed withService
mock_mod
: mock module; defaults toproto_mod
suffixed withMock
Specifies a transport adapter for the RPC calls along with its options.
The following adapters are supported:
You may also use your own adapter module by passing it as first argument.