about summary refs log tree commit diff
path: root/tvix/store/src/pathinfoservice
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-11-09T13·16+0000
committerflokli <flokli@flokli.de>2024-11-11T18·46+0000
commitd505f03e005b87d315694a22a75c11205266ba7d (patch)
tree67efb1d5d1756e7dce67f95b877a92bd5004bc7e /tvix/store/src/pathinfoservice
parent8df919dcf04b5c2502f3a63b4d013669da5e70c1 (diff)
refactor(tvix/store/composition): rename 'default' to 'root' r/8899
This becomes the root of the composition. `default` implies we can
directly access anything else, which we cannot. `root` makes this more
understandable, and it's all internal only anyways.

Change-Id: I297511bc05a7c32c59510b9d192b40d1bd937b5f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12746
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src/pathinfoservice')
-rw-r--r--tvix/store/src/pathinfoservice/from_addr.rs4
-rw-r--r--tvix/store/src/pathinfoservice/nix_http.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/tvix/store/src/pathinfoservice/from_addr.rs b/tvix/store/src/pathinfoservice/from_addr.rs
index 683457345c6c..2f5c776293cb 100644
--- a/tvix/store/src/pathinfoservice/from_addr.rs
+++ b/tvix/store/src/pathinfoservice/from_addr.rs
@@ -128,12 +128,12 @@ mod tests {
     async fn test_from_addr_tokio(#[case] uri_str: &str, #[case] exp_succeed: bool) {
         let mut comp = Composition::new(&REG);
         comp.extend(vec![(
-            "default".into(),
+            "root".into(),
             DeserializeWithRegistry(Box::new(MemoryBlobServiceConfig {})
                 as Box<dyn ServiceBuilder<Output = dyn BlobService>>),
         )]);
         comp.extend(vec![(
-            "default".into(),
+            "root".into(),
             DeserializeWithRegistry(Box::new(MemoryDirectoryServiceConfig {})
                 as Box<dyn ServiceBuilder<Output = dyn DirectoryService>>),
         )]);
diff --git a/tvix/store/src/pathinfoservice/nix_http.rs b/tvix/store/src/pathinfoservice/nix_http.rs
index 6b8960b75c33..af7580b1c61f 100644
--- a/tvix/store/src/pathinfoservice/nix_http.rs
+++ b/tvix/store/src/pathinfoservice/nix_http.rs
@@ -296,13 +296,13 @@ impl TryFrom<Url> for NixHTTPPathInfoServiceConfig {
             .into_iter()
             .find(|(k, _)| k == "blob_service")
             .map(|(_, v)| v.to_string())
-            .unwrap_or("default".to_string());
+            .unwrap_or("root".to_string());
         let directory_service = url
             .query_pairs()
             .into_iter()
             .find(|(k, _)| k == "directory_service")
             .map(|(_, v)| v.to_string())
-            .unwrap_or("default".to_string());
+            .unwrap_or("root".to_string());
 
         Ok(NixHTTPPathInfoServiceConfig {
             // Stringify the URL and remove the nix+ prefix.