Page MenuHomePhabricator

[tunnelbroker-client] Adding Tunnelbroker tonic client initialization function
ClosedPublic

Authored by max on Jan 17 2023, 6:29 AM.
Tags
None
Referenced Files
F3485700: D6281.diff
Wed, Dec 18, 12:33 AM
Unknown Object (File)
Sat, Dec 14, 8:59 PM
Unknown Object (File)
Nov 15 2024, 8:44 PM
Unknown Object (File)
Nov 10 2024, 8:21 PM
Unknown Object (File)
Oct 27 2024, 5:33 PM
Unknown Object (File)
Oct 12 2024, 10:29 PM
Unknown Object (File)
Sep 29 2024, 12:22 AM
Unknown Object (File)
Sep 29 2024, 12:22 AM
Subscribers

Details

Summary

This diff introduces an initialize_client function that initializes the Tonic client instance and returns a client channel for it. The client instance from this function will be passed as an argument into the publish and consume functions in the follow-up diffs.

Linear task: ENG-2728

Test Plan

Running of run nix develop --accept-flake-config -c bash -c "cargo test" will successfully build the library.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max published this revision for review.Jan 17 2023, 7:15 AM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added reviewers: jon, varun.
Compiling tunnelbroker-client v0.1.0 (/home/jon/comm/comm/shared/tunnelbroker-client)
Compiling h2 v0.3.15
Compiling tower v0.4.13
Compiling tower-http v0.3.5
Compiling hyper v0.14.23
Compiling hyper-timeout v0.4.1
Compiling tonic v0.8.3
 Finished dev [unoptimized + debuginfo] target(s) in 48.53s
This revision is now accepted and ready to land.Jan 17 2023, 11:16 AM
This revision now requires review to proceed.Jan 25 2023, 4:59 AM
varun added inline comments.
shared/tunnelbroker-client/src/lib.rs
27 ↗(On Diff #20996)

this isn't exactly right, is it? we just failed to run the future to completion

This revision is now accepted and ready to land.Jan 25 2023, 12:19 PM

Changing imported protobuff codegen name from tunnelbroker to the protobuff and making it public.
Fixing expect error message.

max added inline comments.
shared/tunnelbroker-client/src/lib.rs
27 ↗(On Diff #20996)

this isn't exactly right, is it? we just failed to run the future to completion

Yes, that's right! Fixed, thanks for catching it.

max marked an inline comment as done.

Removing of unused template.

Changing protobuf codegen name from protobuff to tunnelbroker_pb based on the D6284#inline-43306 comment

Rebasing on parent changes.

In D6281#200724, @varun wrote:

Typo in “to” just FYI

Thanks, @varun! I'll fix this before landing!

Fixing to typo in a comment.