feat(tvix/store/pathinfosvc): add gRPC client

Change-Id: Ie8e205c691bd11db99fcf097357c1e49161c6e19
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8349
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-03-25 22:17:23 +01:00 committed by clbot
parent 93f3964cbc
commit b919f29752
3 changed files with 80 additions and 0 deletions

View file

@ -1,5 +1,6 @@
use std::sync::PoisonError;
use thiserror::Error;
use tokio::task::JoinError;
use tonic::Status;
/// Errors related to communication with the store.
@ -18,6 +19,12 @@ impl<T> From<PoisonError<T>> for Error {
}
}
impl From<JoinError> for Error {
fn from(value: JoinError) -> Self {
Error::StorageError(value.to_string())
}
}
impl From<Error> for Status {
fn from(value: Error) -> Self {
match value {