grpc v0.5.0-beta GRPC.Endpoint View Source
GRPC endpoint for multiple servers and interceptors.
Usage
defmodule Your.Endpoint do
use GRPC.Endpoint
intercept GRPC.Logger.Server, level: :info
intercept Other.Interceptor
run HelloServer, interceptors: [HelloHaltInterceptor]
run FeatureServer
end
Interceptors will be run around your rpc calls from top to bottom. And you can even set
interceptors for some of servers. In the above example, [GRPC.Logger.Server, Other.Interceptor, HelloHaltInterceptor]
will be run for HelloServer
, and [GRPC.Logger.Server, Other.Interceptor]
will be run for FeatureServer
.
Link to this section Summary
Functions
Options
opts
keyword will be passed to Interceptor's init/1
Options
:interceptors
- custom interceptors for these servers
Link to this section Functions
Link to this macro
intercept(name) View Source (macro)
Link to this macro
intercept(name, opts) View Source (macro)
Options
opts
keyword will be passed to Interceptor's init/1
Link to this macro
run(servers, opts \\ []) View Source (macro)
Options
:interceptors
- custom interceptors for these servers