Asks near first, if not found, asks far.
If found in there, returns it, and inserts it into
near.
There is no negative cache.
Inserts and listings are not implemented for now.
ServiceBuilder implementation that builds a SigningPathInfoService that signs narinfos using
a keyfile. The keyfile is parsed using parse_keypair, the expected format is the nix one
(nix-store --generate-binary-cache-key for more informations).
NixHTTPPathInfoService acts as a bridge in between the Nix HTTP Binary cache
protocol provided by Nix binary caches such as cache.nixos.org, and the Snix
Store Model.
It implements the PathInfoService trait in an interesting way:
Every PathInfoService::get fetches the .narinfo and referred NAR file,
inserting components into a BlobService and DirectoryService, then
returning a PathInfo struct with the root.
PathInfoService implementation using redb under the hood.
redb stores all of its data in a single file with a K/V pointing from a pathβs output hash to
its corresponding protobuf-encoded PathInfo.
Helper to construct a SnixStoreFs from a BlobService, DirectoryService
and PathInfoService.
This avoids users to have to interact with the wrapper struct directly, as
it leaks into the type signature of SnixStoreFS.