type UnaryServerInterceptor type UnaryServerInterceptor func(ctx context.Context, req interface{}, i

来源:互联网 发布:excel生成数据透视表 编辑:程序博客网 时间:2024/05/22 14:49

type UnaryServerInterceptor

type UnaryServerInterceptor func(ctx context.Context, req interface{}, info *UnaryServerInfo, handler UnaryHandler) (resp interface{}, err error)

UnaryServerInterceptor provides a hook to intercept the execution of a unary RPC on the server. info contains all the information of this RPC the interceptor can operate on. And handler is the wrapper of the service method implementation. It is the responsibility of the interceptor to invoke handler to complete the RPC.

原创粉丝点击