refactor(tvix/store/blobsvc): make from_addr not async

A previous iteration of this code did actually connect (in the gRPC
client), which was why we had this function async.

However, as the connection there is now lazy too, we can drop the
asyncness in this function.

Change-Id: Idd5bd953a6a1c2334066ee672cfb87fcb74f9f94
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8780
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Florian Klink 2023-06-15 00:00:39 +03:00 committed by clbot
parent 35bff2bda6
commit c5851fb815
2 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ use super::{BlobService, GRPCBlobService, MemoryBlobService, SledBlobService};
/// - `grpc+*://` ([GRPCBlobService])
///
/// See their [from_url] methods for more details about their syntax.
pub async fn from_addr(uri: &str) -> Result<Arc<dyn BlobService>, crate::Error> {
pub fn from_addr(uri: &str) -> Result<Arc<dyn BlobService>, crate::Error> {
let url = Url::parse(uri).map_err(|e| {
crate::Error::StorageError(format!("unable to parse url: {}", e.to_string()))
})?;