Class: Client

src/client.makeClientConstructor~ Client

new Client(address, credentials, options, updateMetadataopt)

Create a client with the given methods
Parameters:
Name Type Attributes Description
address string The address of the server to connect to
credentials grpc.Credentials Credentials to use to connect to the server
options Object Options to pass to the underlying channel
updateMetadata function <optional>
function to update the metadata for each request
Source:

Methods

$waitForReady(deadline, callback)

Wait for the client to be ready. The callback will be called when the client has successfully connected to the server, and it will be called with an error if the attempt to connect to the server has unrecoverablly failed or if the deadline expires. This function will make the channel start connecting if it has not already done so.
Parameters:
Name Type Description
deadline Date | Number When to stop waiting for a connection. Pass Infinity to wait forever.
callback function The callback to call when done attempting to connect.
Source: