The GRPC client.
The connection timeout in milliseconds.
The connection resolver.
The performance counters.
The logger.
The configuration options.
The invocation timeout in milliseconds.
The remote service uri which is calculated on open.
Calls a remote method via GRPC protocol.
a method name to called
(optional) transaction id to trace execution through call chain.
(optional) request object.
(optional) callback function that receives result object or error.
Closes component and frees used resources.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Configures component by passing configuration parameters.
configuration parameters to be set.
Adds instrumentation to log calls and measure call time. It returns a CounterTiming object that is used to end the time measurement.
(optional) transaction id to trace execution through call chain.
a method name.
CounterTiming object to end the time measurement.
Adds instrumentation to error handling.
(optional) transaction id to trace execution through call chain.
a method name.
an occured error
(optional) an execution result
(optional) an execution callback
Checks if the component is opened.
true if the component has been opened and false otherwise.
Opens the component.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Sets references to dependent components.
references to locate the component dependencies.
Generated using TypeDoc
Abstract client that calls remove endpoints using GRPC protocol.
Configuration parameters
References
*:logger:*:*:1.0
(optional) ILogger components to pass log messages*:counters:*:*:1.0
(optional) ICounters components to pass collected measurements*:discovery:*:*:1.0
(optional) IDiscovery services to resolve connectionGrpcService
CommandableGrpcService
Example
class MyGrpcClient extends GrpcClient implements IMyClient { ... public getData(correlationId: string, id: string, callback: (err: any, result: MyData) => void): void { let timing = this.instrument(correlationId, 'myclient.get_data'); this.call("get_data", correlationId, { id: id }, (err, result) => { timing.endTiming(); callback(err, result); }); } ... } let client = new MyGrpcClient(); client.configure(ConfigParams.fromTuples( "connection.protocol", "http", "connection.host", "localhost", "connection.port", 8080 )); client.getData("123", "1", (err, result) => { ... });