GrpcClient

GrpcClient

GrpcClient

  • You need to create instance of GrpcClient to call remote functions implemented in your services

Constructor

new GrpcClient(options)

Source:
Parameters:
Name Type Description
options object
Name Type Attributes Description
proto string

Sevice protobuf schema ".proto" file

service number

gRPC service name (same name defined in protobuf schema)

url number

gRPC server url (host:port)

loaderOptions object <optional>

Protobuf loader configurations

Methods

(async) call(method, dataopt, metaopt)

Actual remote functions call happen here

Source:
Parameters:
Name Type Attributes Description
method function

method name on gRPC remote service

data object <optional>

object contains all required arguments for remote method

meta object <optional>

object contains additional payload data to be passed as gRPC metadata