Module tvix_castore::blobservice
source · Modules§
Structs§
- ChunkedReader provides a chunk-aware BlobReader, so allows reading and seeking into a blob. It internally holds a ChunkedBlob, which is storing chunk information able to emit a reader seeked to a specific position whenever we need to seek.
- Combinator for a BlobService, using a “local” and “remote” blobservice. Requests are tried in (and returned from) the local store first, only if things are not present there, the remote BlobService is queried. In case the local blobservice doesn’t have the blob, we ask the remote blobservice for chunks, and try to read each of these chunks from the local blobservice again, before falling back to the remote one. The remote BlobService is never written to.
- Connects to a (remote) tvix-store BlobService over gRPC.
- Uses any object storage supported by the object_store crate to provide a tvix-castore BlobService.
Traits§
- BlobReader is a tokio::io::AsyncRead that also allows seeking.
- The base trait all BlobService services need to implement. It provides functions to check whether a given blob exists, a way to read (and seek) a blob, and a method to create a blobwriter handle, which will implement a writer interface, and also provides a close funtion, to finalize a blob and get its digest.
- A tokio::io::AsyncWrite that the user needs to close() afterwards for persist. On success, it returns the digest of the written blob.
Functions§
- Constructs a new instance of a BlobService from an URI.
- Registers the builtin BlobService implementations with the registry