feat(tvix/castore): extend blobstore protos for verified streaming
This pdates the proto docstrings a bit, especially w.r.t. verified streaming. It also adds send_chunks, send_bao fields to StatBlobRequest (renamed from BlobMeta) Change-Id: I590cc8646d86b73bca9f38a9b6d9ea15e4df5cb6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9951 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
parent
b921e3a7e3
commit
67999f0dcf
5 changed files with 263 additions and 90 deletions
|
|
@ -56,6 +56,7 @@ impl BlobService for GRPCBlobService {
|
|||
let resp = grpc_client
|
||||
.stat(proto::StatBlobRequest {
|
||||
digest: digest.clone().into(),
|
||||
..Default::default()
|
||||
})
|
||||
.await;
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ impl super::blob_service_server::BlobService for GRPCBlobServiceWrapper {
|
|||
async fn stat(
|
||||
&self,
|
||||
request: Request<super::StatBlobRequest>,
|
||||
) -> Result<Response<super::BlobMeta>, Status> {
|
||||
) -> Result<Response<super::StatBlobResponse>, Status> {
|
||||
let rq = request.into_inner();
|
||||
let req_digest = rq
|
||||
.digest
|
||||
|
|
@ -101,7 +101,7 @@ impl super::blob_service_server::BlobService for GRPCBlobServiceWrapper {
|
|||
.map_err(|_e| Status::invalid_argument("invalid digest length"))?;
|
||||
|
||||
match self.blob_service.has(&req_digest).await {
|
||||
Ok(true) => Ok(Response::new(super::BlobMeta::default())),
|
||||
Ok(true) => Ok(Response::new(super::StatBlobResponse::default())),
|
||||
Ok(false) => Err(Status::not_found(format!("blob {} not found", &req_digest))),
|
||||
Err(e) => Err(e.into()),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue