View Source GRPC.Endpoint (grpc v0.11.1)
GRPC endpoint for multiple servers and interceptors.
Usage
defmodule Your.Endpoint do
use GRPC.Endpoint
intercept GRPC.Server.Interceptors.Logger, level: :info
intercept Other.Interceptor
run HelloServer, interceptors: [HelloHaltInterceptor]
run FeatureServer
endInterceptors 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.Server.Interceptors.Logger, Other.Interceptor, HelloHaltInterceptor] will be run for HelloServer, and [GRPC.Server.Interceptors.Logger, Other.Interceptor]
will be run for FeatureServer.
Summary
Functions
Options
opts keyword will be passed to Interceptor's init/1
Options
:interceptors- custom interceptors for these servers