diff options
Diffstat (limited to 'tvix/store/src/pathinfoservice/mod.rs')
-rw-r--r-- | tvix/store/src/pathinfoservice/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/store/src/pathinfoservice/mod.rs b/tvix/store/src/pathinfoservice/mod.rs index 0a91d6267260..a0c48f5cc9d5 100644 --- a/tvix/store/src/pathinfoservice/mod.rs +++ b/tvix/store/src/pathinfoservice/mod.rs @@ -62,6 +62,8 @@ pub trait PathInfoService: Send + Sync { /// [async_trait] generates, but for streams instead of futures. fn list(&self) -> BoxStream<'static, Result<PathInfo, Error>>; + /// Returns a (more) suitable NarCalculationService. + /// This can be used to offload NAR calculation to the remote side. fn nar_calculation_service(&self) -> Option<Box<dyn NarCalculationService>> { None } @@ -83,6 +85,10 @@ where fn list(&self) -> BoxStream<'static, Result<PathInfo, Error>> { self.as_ref().list() } + + fn nar_calculation_service(&self) -> Option<Box<dyn NarCalculationService>> { + self.as_ref().nar_calculation_service() + } } /// Registers the builtin PathInfoService implementations with the registry |