HomePhabricator
Diffusion Comm 7b4e9f3176d2

[keyserver] Adding Tunnelbroker-client napi-rs publish class method

Description

[keyserver] Adding Tunnelbroker-client napi-rs publish class method

Summary:
This diff introduces a publish class method for the napi-rs bridge Tunnelbroker client class.
It uses a client-shared function from the D6284 to push a message to the mspc which is bound to the gRPC tx stream.

Linear task: ENG-2729

Test Plan:

  1. Keyserver service is successfully built.
  2. Manually testing:
    • Start the Tunnelbroker server;
    • Create a TunnelbrokerClient in a node js codebase by passing the address and a callback function.
    • Call publish with the corresponding payload and device_id.
    • The expected result is that the message will be delivered to the stream with the corresponding device_id.

The concept was tested using the echo bidi stream and simple client in the testing repo.

Reviewers: varun, jon, bartek

Reviewed By: varun, jon

Subscribers: bartek, ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D6460