From 4801d6bf85ebb47910dd4bfe9db11846ff438572 Mon Sep 17 00:00:00 2001 From: Yureka Date: Fri, 19 Jul 2024 10:51:05 +0200 Subject: feat(tvix): different service types in one composition This will be necessary for the PathInfoService composition, as some PathInfoService implementations require a BlobService & DirectoryService to ingest into. Using the Extend trait for creating compositions allows extending the same composition with configs of various types e.g. BlobStore, DirectoryStore Generics are moved from the Composition struct to the functions.The storage of the InstantiatonStates uses the TypeId in the key and a Box in the value, which is downcasted to InstantiatonState. Change-Id: I2af11f26c535029adfb1c62905e0e7c4aaed7b51 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11980 Reviewed-by: flokli Reviewed-by: raitobezarius Tested-by: BuildkiteCI Autosubmit: yuka --- tvix/castore/src/directoryservice/combinators.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/castore/src/directoryservice/combinators.rs') diff --git a/tvix/castore/src/directoryservice/combinators.rs b/tvix/castore/src/directoryservice/combinators.rs index 74d02f1ad2b9..0fdc82c16cb0 100644 --- a/tvix/castore/src/directoryservice/combinators.rs +++ b/tvix/castore/src/directoryservice/combinators.rs @@ -167,7 +167,7 @@ impl ServiceBuilder for CacheConfig { async fn build<'a>( &'a self, _instance_name: &str, - context: &CompositionContext, + context: &CompositionContext, ) -> Result, Box> { let (near, far) = futures::join!( context.resolve(self.near.clone()), -- cgit 1.4.1