about summary refs log tree commit diff
path: root/tvix/store/src/utils.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-11-09T14·20+0000
committerflokli <flokli@flokli.de>2024-11-11T18·46+0000
commita9f453f6da90c39c67df209d298062b751b93f73 (patch)
tree8995436a244569182730184f4b661a4c7d1475a6 /tvix/store/src/utils.rs
parente71a857ec892f14ee7ce318f6753ba4af8d5ca4e (diff)
docs(tvix/[ca]store): improve docstrings, remove wildcard imports r/8901
Extend the docstrings of `add_default_services`, and add one for
`addrs_to_configs` as well as the module-wide one at
`tvix_store::composition`.

Change-Id: Ie9b449988eb210cd65b19b174094bbe0c4af2fd6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12748
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
Diffstat (limited to 'tvix/store/src/utils.rs')
-rw-r--r--tvix/store/src/utils.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/tvix/store/src/utils.rs b/tvix/store/src/utils.rs
index 0a1888f6f2e1..19e0dce568ce 100644
--- a/tvix/store/src/utils.rs
+++ b/tvix/store/src/utils.rs
@@ -9,11 +9,12 @@ use tokio::io::{self, AsyncWrite};
 use tvix_castore::{blobservice::BlobService, directoryservice::DirectoryService};
 use url::Url;
 
-use crate::composition::{
-    with_registry, Composition, DeserializeWithRegistry, ServiceBuilder, REG,
-};
+use crate::composition::REG;
 use crate::nar::{NarCalculationService, SimpleRenderer};
 use crate::pathinfoservice::PathInfoService;
+use tvix_castore::composition::{
+    with_registry, Composition, DeserializeWithRegistry, ServiceBuilder,
+};
 
 #[derive(serde::Deserialize, Default)]
 pub struct CompositionConfigs {
@@ -127,6 +128,10 @@ impl From<ServiceUrlsMemory> for ServiceUrls {
     }
 }
 
+/// Deserializes service addresses into composition config, configuring each
+/// service as the single "root".
+/// If the `xp-composition-cli` feature is enabled, and a file specified in the
+/// `--experimental-store-composition` parameter, this is used instead.
 pub async fn addrs_to_configs(
     urls: impl Into<ServiceUrls>,
 ) -> Result<CompositionConfigs, Box<dyn std::error::Error + Send + Sync>> {