Module blobservice

Source

ModulesΒ§

chunked_reader πŸ”’
combinator πŸ”’
from_addr πŸ”’
grpc πŸ”’
memory πŸ”’
object_store πŸ”’

StructsΒ§

ChunkedReader
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.
CombinedBlobService
Combinator for a BlobService, using a β€œnear” and β€œfar” blobservice. Requests are tried in (and returned from) the near store first, only if things are not present there, the far BlobService is queried. In case the near blobservice doesn’t have the blob, we ask the remote blobservice for chunks, and try to read each of these chunks from the near blobservice again, before falling back to the far one. The far BlobService is never written to.
CombinedBlobServiceConfig
GRPCBlobService
Connects to a (remote) snix-store BlobService over gRPC.
GRPCBlobServiceConfig
MemoryBlobService
MemoryBlobServiceConfig
ObjectStoreBlobService
Uses any object storage supported by the object_store crate to provide a snix-castore BlobService.
ObjectStoreBlobServiceConfig

TraitsΒ§

BlobReader
BlobReader is a tokio::io::AsyncRead that also allows seeking.
BlobService
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.
BlobWriter
A tokio::io::AsyncWrite that the user needs to close() afterwards for persist. On success, it returns the digest of the written blob.

FunctionsΒ§

from_addr
Constructs a new instance of a BlobService from an URI.
register_blob_services πŸ”’
Registers the builtin BlobService implementations with the registry