feat(tvix/store/blobservice): add GRPCBlobServiceWrapper

This takes a BlobService and ChunkService in the constructor, and
provides a [proto::blob_service_server::BlobService] trait for it.

Implementing proto::blob_service_server::BlobService is a lot of surface
to cover, and providing this wrapper will make individual
implementations taking care of how to store chunks or chunking
information much simpler.

Change-Id: Ia7b46484fb3ac9104354d496ff2922dca96ff7b9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8092
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-02-12 12:34:15 +01:00 committed by flokli
parent bdf0725def
commit 69516f1f68
3 changed files with 244 additions and 0 deletions

View file

@ -7,6 +7,9 @@ use prost::Message;
use nix_compat::store_path::{ParseStorePathError, StorePath};
mod grpc_blobservice_wrapper;
pub use grpc_blobservice_wrapper::GRPCBlobServiceWrapper;
tonic::include_proto!("tvix.store.v1");
#[cfg(feature = "reflection")]