From a9f453f6da90c39c67df209d298062b751b93f73 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 9 Nov 2024 14:20:03 +0000 Subject: docs(tvix/[ca]store): improve docstrings, remove wildcard imports 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 --- tvix/store/src/utils.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tvix/store/src/utils.rs') 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 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, ) -> Result> { -- cgit 1.4.1