Skip to main content

Module nar

Module nar 

Source

Modulesยง

import ๐Ÿ”’
listing ๐Ÿ”’
narcalculationservice ๐Ÿ”’
renderer ๐Ÿ”’

Structsยง

Reader
Renderer
NarCalculationService traversing the node and rendering the NAR to calculate NAR hash and size.

Enumsยง

ListingError
NarIngestionError
Represents errors that can happen during nar ingestion.
RenderError
Errors that can encounter while rendering NARs.

Traitsยง

NarCalculationService

Functionsยง

ingest_nar
Ingests the contents from a AsyncRead providing NAR into the snix store, interacting with a BlobService and DirectoryService. It returns the castore root node or an error.
ingest_nar_and_hash
Ingests the contents from a AsyncRead providing NAR into the snix store, interacting with a BlobService and DirectoryService. Returns the castore root node, as well as the sha256 and size of the NAR contents ingested.
produce_listing
Accepts a Node pointing to the root of a (store) path, and uses the passed DirectoryService to expand the entire structure. Then assembles a Listing.
write_nar
write_nar_simple
Accepts a Node pointing to the root of a (store) path, and uses the passed blob_service and directory_service to perform the necessary lookups as it traverses the structure. The contents in NAR serialization are writen to the passed AsyncWrite.