diff options
author | Florian Klink <flokli@flokli.de> | 2023-11-13T12·32+0200 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2023-11-15T06·43+0000 |
commit | 30e0c320666f8ecaf37f6d966e45c40f988cce78 (patch) | |
tree | 808bdb2c8832e2083bc17493dc8982b755486824 /tvix/store/src/pathinfoservice/grpc.rs | |
parent | c83841d3a13a5d5b3fdaa7f9beecd743f1283691 (diff) |
refactor(tvix/castore/tonic): make async, support wait-connect=? r/7022
This moves the sync `channel::from_url` to a async `tonic::channel_from_url`. It now allows connecting non-lazily if `wait- connect=1` is set in the URL params. Also, make the pingpong tests for blobsvc and directorysvc use the wait- connect=1 codepath. Change-Id: Ibeea33117c8121814627e7f6aba0e943ae2e92ca Reviewed-on: https://cl.tvl.fyi/c/depot/+/10030 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/store/src/pathinfoservice/grpc.rs')
-rw-r--r-- | tvix/store/src/pathinfoservice/grpc.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/store/src/pathinfoservice/grpc.rs b/tvix/store/src/pathinfoservice/grpc.rs index 2e58a464aa46..ef3b0b77ec54 100644 --- a/tvix/store/src/pathinfoservice/grpc.rs +++ b/tvix/store/src/pathinfoservice/grpc.rs @@ -180,7 +180,9 @@ mod tests { let url = url::Url::parse(&format!("grpc+unix://{}", socket_path.display())) .expect("must parse"); let client = PathInfoServiceClient::new( - tvix_castore::channel::from_url(&url).expect("must succeed"), + tvix_castore::tonic::channel_from_url(&url) + .await + .expect("must succeed"), ); GRPCPathInfoService::from_client(client) |