about summary refs log tree commit diff
path: root/tvix/store/src/bin/tvix-store.rs
diff options
context:
space:
mode:
authorConnor Brewster <cbrewster@hey.com>2023-10-14T16·58-0500
committerConnor Brewster <cbrewster@hey.com>2023-10-14T18·56+0000
commite3d72cc4cb6714f683e97e8405f296977335efa6 (patch)
treef02f6ea7a1373d1f87e53431f6d9bf8cdd2072d1 /tvix/store/src/bin/tvix-store.rs
parent8e811fe62536a45b15e4333a0542d60dbbc74f43 (diff)
refactor(tvix/store): Upgrade tokio-listener to get tonic support r/6810
Tonic support was added to tokio-listener upstream which removes the
need for use to have tonic compatibility wrapper types around it.

See: https://github.com/vi/tokio-listener/pull/2

Fixes b/311

Change-Id: I04a2dbb3bc3c8bfe9339583c0b46070c7ec97811
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9721
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store/src/bin/tvix-store.rs')
-rw-r--r--tvix/store/src/bin/tvix-store.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs
index 2f7589b073..db19c532f3 100644
--- a/tvix/store/src/bin/tvix-store.rs
+++ b/tvix/store/src/bin/tvix-store.rs
@@ -7,6 +7,9 @@ use std::io;
 use std::path::Path;
 use std::path::PathBuf;
 use tokio::task::JoinHandle;
+use tokio_listener::Listener;
+use tokio_listener::SystemOptions;
+use tokio_listener::UserOptions;
 use tracing_subscriber::prelude::*;
 use tvix_castore::blobservice;
 use tvix_castore::directoryservice;
@@ -17,7 +20,6 @@ use tvix_castore::proto::node::Node;
 use tvix_castore::proto::GRPCBlobServiceWrapper;
 use tvix_castore::proto::GRPCDirectoryServiceWrapper;
 use tvix_castore::proto::NamedNode;
-use tvix_store::listener::ListenerStream;
 use tvix_store::pathinfoservice;
 use tvix_store::proto::path_info_service_server::PathInfoServiceServer;
 use tvix_store::proto::GRPCPathInfoServiceWrapper;
@@ -228,7 +230,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
 
             info!("tvix-store listening on {}", listen_address);
 
-            let listener = ListenerStream::bind(&listen_address).await?;
+            let listener = Listener::bind(
+                &listen_address,
+                &SystemOptions::default(),
+                &UserOptions::default(),
+            )
+            .await?;
 
             router.serve_with_incoming(listener).await?;
         }