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-09-03T14·10+0300
committerclbot <clbot@tvl.fyi>2023-09-05T21·13+0000
commitf9b5fc49b123cb4db3941ee2ae9b891f5262deef (patch)
tree47aa3496ad69b7b4c6010956b90f454da12947c4 /tvix/store/src/bin/tvix-store.rs
parentda9d706e0a5e4e37087e4841a8fc8edf0da35e77 (diff)
feat(tvix/store/fuse): allow listing r/6556
This provides an additional configuration flag to the tvix-store mount
subcommand, and logic in the fuse module to request listing for the
root of the mountpoint.

Change-Id: I05a8bc11f7991b574696f27a30afe0f4e718a58c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9217
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: adisbladis <adisbladis@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src/bin/tvix-store.rs')
-rw-r--r--tvix/store/src/bin/tvix-store.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs
index 5b6c98e4ee..d2a8927351 100644
--- a/tvix/store/src/bin/tvix-store.rs
+++ b/tvix/store/src/bin/tvix-store.rs
@@ -90,6 +90,10 @@ enum Commands {
 
         #[arg(long, env, default_value = "grpc+http://[::1]:8000")]
         path_info_service_addr: String,
+
+        /// Whether to list elements at the root of the mount point.
+        #[clap(long, short, action)]
+        list_root: bool,
     },
 }
 
@@ -250,6 +254,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
             blob_service_addr,
             directory_service_addr,
             path_info_service_addr,
+            list_root,
         } => {
             let blob_service = blobservice::from_addr(&blob_service_addr)?;
             let directory_service = directoryservice::from_addr(&directory_service_addr)?;
@@ -260,7 +265,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
             )?;
 
             tokio::task::spawn_blocking(move || {
-                let f = FUSE::new(blob_service, directory_service, path_info_service);
+                let f = FUSE::new(
+                    blob_service,
+                    directory_service,
+                    path_info_service,
+                    list_root,
+                );
                 fuser::mount2(f, &dest, &[])
             })
             .await??