View Source GRPC.Endpoint (grpc v0.6.0)

GRPC endpoint for multiple servers and interceptors.

usage

Usage

defmodule Your.Endpoint do
  use GRPC.Endpoint

  intercept GRPC.Server.Interceptors.Logger, 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.Server.Interceptors.Logger, Other.Interceptor, HelloHaltInterceptor] will be run for HelloServer, and [GRPC.Server.Interceptors.Logger, 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

Options

opts keyword will be passed to Interceptor's init/1

Link to this macro

run(servers, opts \\ [])

View Source (macro)

options

Options

  • :interceptors - custom interceptors for these servers