Namespace: rpc

rpc

Streaming RPC helpers.

Classes

Service

Type Definitions

rpc.ServiceMethod(request, callback){ Promise<Message.<TRes>> }

A service method part of a rpc.Service as created by Service.create.

Name Type Description
request TReq | Properties.<TReq>

Request message or plain object

callback rpc.ServiceMethodCallback.<TRes> optional

Node-style callback called with the error, if any, and the response message

Returns:
Type Description
Promise.<Message.<TRes>> Promise if callback has been omitted, otherwise undefined

rpc.ServiceMethodCallback(error, response){ undefined }

A service method callback as used by ServiceMethod.

Differs from RPCImplCallback in that it is an actual callback of a service method which may not return response = null.

Name Type Description
error Error | null

Error, if any

response TRes optional

Response message

Returns:
Type Description
undefined