about summary refs log tree commit diff
path: root/tvix/store/src/bin/tvix-store.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-06-12T13·04+0300
committerflokli <flokli@flokli.de>2023-06-12T13·27+0000
commitb5e37869e6ddddf0575bdc98e0f4cc05753f0fc0 (patch)
tree92aeb382accb472ab935ec1f097c0dd6a547e27c /tvix/store/src/bin/tvix-store.rs
parent64a4f6185c5dcd96ee57978963324ea50f4dd6f7 (diff)
refactor(tvix/store/pathinfosvc): use Arc<dyn …> r/6279
This removes the use of generics, like previously done with Blob and
Directory services.

Change-Id: I7cc8bd1439b026c88e80c11e38aafc63c74e5e84
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8751
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/store/src/bin/tvix-store.rs')
-rw-r--r--tvix/store/src/bin/tvix-store.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs
index ae72559d3943..b95f408a55b6 100644
--- a/tvix/store/src/bin/tvix-store.rs
+++ b/tvix/store/src/bin/tvix-store.rs
@@ -13,6 +13,7 @@ use tvix_store::directoryservice::DirectoryService;
 use tvix_store::directoryservice::GRPCDirectoryService;
 use tvix_store::directoryservice::SledDirectoryService;
 use tvix_store::pathinfoservice::GRPCPathInfoService;
+use tvix_store::pathinfoservice::PathInfoService;
 use tvix_store::pathinfoservice::SledPathInfoService;
 use tvix_store::proto::blob_service_client::BlobServiceClient;
 use tvix_store::proto::blob_service_server::BlobServiceServer;
@@ -104,11 +105,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
                 Arc::new(SledBlobService::new("blobs.sled".into())?);
             let directory_service: Arc<dyn DirectoryService> =
                 Arc::new(SledDirectoryService::new("directories.sled".into())?);
-            let path_info_service = SledPathInfoService::new(
+            let path_info_service: Arc<dyn PathInfoService> = Arc::new(SledPathInfoService::new(
                 "pathinfo.sled".into(),
                 blob_service.clone(),
                 directory_service.clone(),
-            )?;
+            )?);
 
             let listen_address = listen_address
                 .unwrap_or_else(|| "[::]:8000".to_string())
@@ -156,7 +157,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
             let io = Arc::new(TvixStoreIO::new(
                 Arc::new(blob_service),
                 Arc::new(directory_service),
-                path_info_service,
+                Arc::new(path_info_service),
             ));
 
             let tasks = paths
@@ -193,7 +194,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
                 let f = FUSE::new(
                     Arc::new(blob_service),
                     Arc::new(directory_service),
-                    path_info_service,
+                    Arc::new(path_info_service),
                 );
                 fuser::mount2(f, &dest, &[])
             })