diff options
author | Yureka <tvl@yuka.dev> | 2024-07-21T17·17+0200 |
---|---|---|
committer | yuka <tvl@yuka.dev> | 2024-07-22T13·36+0000 |
commit | 14a4b4cbc38f64c85475a759efc1a3c90003fb3d (patch) | |
tree | 84d713eabed9e0f2e4d0bb80864e5f7018f576e5 /tvix/store/src/bin | |
parent | 67335c41b7828e11d28dead8193152da94116e6d (diff) |
feat(tvix): add experimental-store-composition option r/8400
Change-Id: I61661fbb0e77ce3c00c2a467dfabdf3fc77d8575 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12011 Autosubmit: yuka <yuka@yuka.dev> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store/src/bin')
-rw-r--r-- | tvix/store/src/bin/tvix-store.rs | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index fd85b8bd36f3..5401f67b3f7e 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -70,12 +70,6 @@ enum Commands { #[clap(flatten)] service_addrs: ServiceUrls, - - /// URL to a PathInfoService that's considered "remote". - /// If set, the other one is considered "local", and a "cache" for the - /// "remote" one. - #[arg(long, env)] - remote_path_info_service_addr: Option<String>, }, /// Imports a list of paths into the store, print the store path for each of them. Import { @@ -167,37 +161,10 @@ async fn run_cli(cli: Cli) -> Result<(), Box<dyn std::error::Error + Send + Sync Commands::Daemon { listen_args, service_addrs, - remote_path_info_service_addr, } => { // initialize stores - let mut configs = tvix_store::utils::addrs_to_configs(service_addrs)?; - - // if remote_path_info_service_addr has been specified, - // update path_info_service to point to a cache combining the two. - if let Some(addr) = remote_path_info_service_addr { - use tvix_store::composition::{with_registry, DeserializeWithRegistry, REG}; - use tvix_store::pathinfoservice::CachePathInfoServiceConfig; - - let remote_url = url::Url::parse(&addr)?; - let remote_config = with_registry(®, || remote_url.try_into())?; - - let local = configs.pathinfoservices.insert( - "default".into(), - DeserializeWithRegistry(Box::new(CachePathInfoServiceConfig { - near: "local".into(), - far: "remote".into(), - })), - ); - configs - .pathinfoservices - .insert("local".into(), local.unwrap()); - configs - .pathinfoservices - .insert("remote".into(), remote_config); - } - let (blob_service, directory_service, path_info_service, nar_calculation_service) = - tvix_store::utils::construct_services_from_configs(configs).await?; + tvix_store::utils::construct_services(service_addrs).await?; let mut server = Server::builder().layer( ServiceBuilder::new() |