diff options
Diffstat (limited to 'tvix/castore/src/blobservice/combinator.rs')
-rw-r--r-- | tvix/castore/src/blobservice/combinator.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tvix/castore/src/blobservice/combinator.rs b/tvix/castore/src/blobservice/combinator.rs index 0bce657e9176..8ec5a859bcda 100644 --- a/tvix/castore/src/blobservice/combinator.rs +++ b/tvix/castore/src/blobservice/combinator.rs @@ -6,7 +6,7 @@ use tonic::async_trait; use tracing::{instrument, warn}; use crate::composition::{CompositionContext, ServiceBuilder}; -use crate::B3Digest; +use crate::{B3Digest, Error}; use super::{naive_seeker::NaiveSeeker, BlobReader, BlobService, BlobWriter}; @@ -103,6 +103,16 @@ pub struct CombinedBlobServiceConfig { remote: String, } +impl TryFrom<url::Url> for CombinedBlobServiceConfig { + type Error = Box<dyn std::error::Error + Send + Sync>; + fn try_from(_url: url::Url) -> Result<Self, Self::Error> { + Err(Error::StorageError( + "Instantiating a CombinedBlobService from a url is not supported".into(), + ) + .into()) + } +} + #[async_trait] impl ServiceBuilder for CombinedBlobServiceConfig { type Output = dyn BlobService; |