From 5d3f3158d6102baee48d2772e85f05cfc1fac95e Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 12 Aug 2024 16:42:09 +0300 Subject: docs(tvix/store/utils): add docstrings for ServiceUrls* Describe what these structs are used for, and for each of it, explain which usecases it's used for. Change-Id: I8b7857bc68ec2b37df9f5163e06d028a64a12c79 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12195 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: Ilan Joselevich --- tvix/store/src/utils.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'tvix') diff --git a/tvix/store/src/utils.rs b/tvix/store/src/utils.rs index c550ad365ed7..1385ece39f8a 100644 --- a/tvix/store/src/utils.rs +++ b/tvix/store/src/utils.rs @@ -29,6 +29,10 @@ pub struct CompositionConfigs { >, } +/// Provides a set clap arguments to configure tvix-[ca]store services. +/// +/// This particular variant has defaults tailored for usecases accessing data +/// directly locally, like the `tvix-store daemon` command. #[derive(clap::Parser, Clone)] pub struct ServiceUrls { #[arg( @@ -56,7 +60,10 @@ pub struct ServiceUrls { experimental_store_composition: Option, } -/// like ServiceUrls, but with different clap defaults +/// Provides a set clap arguments to configure tvix-[ca]store services. +/// +/// This particular variant has defaults tailored for usecases accessing data +/// from another running tvix daemon, via gRPC. #[derive(clap::Parser, Clone)] pub struct ServiceUrlsGrpc { #[arg(long, env, default_value = "grpc+http://[::1]:8000")] @@ -73,7 +80,13 @@ pub struct ServiceUrlsGrpc { experimental_store_composition: Option, } -/// like ServiceUrls, but with different clap defaults +/// Provides a set clap arguments to configure tvix-[ca]store services. +/// +/// This particular variant has defaults tailored for usecases keeping all data +/// in memory. +/// It's currently used in tvix-cli, as we don't really care about persistency +/// there yet, and using something else here might make some perf output harder +/// to interpret. #[derive(clap::Parser, Clone)] pub struct ServiceUrlsMemory { #[arg(long, env, default_value = "memory://")] -- cgit 1.4.1