Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active August 6, 2021 11:35
Show Gist options
  • Save percybolmer/c92b0d08f7cef62c2f4f962bc7c1d830 to your computer and use it in GitHub Desktop.
Save percybolmer/c92b0d08f7cef62c2f4f962bc7c1d830 to your computer and use it in GitHub Desktop.
gRPC Interceptor definitions
type StreamClientInterceptor func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, streamer Streamer, opts ...CallOption) (ClientStream, error)
type StreamServerInterceptor func(srv interface{}, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error
type UnaryClientInterceptor func(ctx context.Context, method string, req, reply interface{}, cc *ClientConn, invoker UnaryInvoker, opts ...CallOption) error
type UnaryServerInterceptor func(ctx context.Context, req interface{}, info *UnaryServerInfo, handler UnaryHandler) (resp interface{}, err error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment