API 参考 / @142vip/grpc / grpcSimpleHandler
函数: grpcSimpleHandler()
grpcSimpleHandler(
methodFunc
): <RequestType
,ResponseType
>(call
,callback
) =>Promise
<void
>
处理GRPC一元调用,不涉及流
- 异步抓换为同步处理
- async/await
参数
methodFunc
返回
<
RequestType
,ResponseType
>(call
,callback
):Promise
<void
>
处理一元调用,不涉及流
类型参数
RequestType
RequestType
ResponseType
ResponseType
参数
call
ServerUnaryCall
<RequestType
, ResponseType
>
callback
sendUnaryData
<GrpcResponse
<ResponseType
>>
返回
Promise
<void
>