about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2022-12-27T17·33+0100
committerflokli <flokli@flokli.de>2022-12-28T13·55+0000
commitc4ee942b1c8cc469891f0b74938f328eba0154e7 (patch)
tree37f08be8036ed28fc042b9e01fb5efa14bbe5162 /tools
parent1c15154b834fd529b95b3026c867e34ad98787f0 (diff)
feat(tvix/store/protos): rename Get to Read, add Stat method r/5528
Stat exposes metadata about a given blob,
such as more granular chunking, baos.
It implicitly allows checking for existence too, as asking this for a
non-existing Blob will return a Status::not_found grpc error.

The previous version returned a Status::not_found error on the Get
request too, but there was no chance to prevent the server from starting
to stream (except sending an immediate cancellation).

Being able to check whether something exists in a BlobStore helps to
prevent from uploading in first place.

The granular chunking bits are an optional optimization - if the
BlobStore implements no more granular chunking, the Stat response can
simply contain a single chunk.

Read returns a stream of BlobChunk, which is just a stream of bytes -
not necessarily using the chunking that's returned in the reply of a
Stat() call. It can be used to read blobs or chunks.

Change-Id: I4b6030ef184ace5484c84ca273b49d710433731d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7652
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions