elixir-grpc / grpc

An Elixir implementation of gRPC
https://hex.pm/packages/grpc
Apache License 2.0
1.36k stars 210 forks source link

Move interceptor behaviour to its own client/server #284

Closed wingyplus closed 1 year ago

wingyplus commented 1 year ago

Currently, the interceptor behavior is defined under the GPRC namespace:

GRPC.ClientInterceptor
GRPC.ServerInterceptor

It seems that it's not consistent with adapter behavior that uses GRPC.Client.Adapter or GRPC.Server.Adapter.

So I would like purpose to move interceptor behavior to under the client/server side. So it would become:

GRPC.Client.Interceptor
GRPC.Server.Interceptor

And the implementation of the interceptor, such as logger, would move into grpc/[client|server]/interceptors as adapters do.