Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::merkle::FileSinkBuilder Struct Referenceabstract

#include <merkle-tar-adapter.hh>

Inheritance diagram for nix::merkle::FileSinkBuilder:
nix::GitRepoPool nix::GitRepoPoolImpl

Public Member Functions

virtual std::unique_ptr< DirectorySinkWithFinalize > makeDirectorySink ()=0
virtual std::unique_ptr< RegularFileSinkWithFinalize > makeRegularFileSink ()=0
virtual merkle::TreeEntry makeSymlink (const std::string &target)=0
virtual void flush ()=0

Detailed Description

Interface for creating merkle file system object sinks.

By returning sinks rather than taking callbacks, we allow starting and finishing sink-based creation in an asynchronous manner. This is crucial to being able to adapt messy providers of file system object data (like tarballs) to this interface.

A directory can only refer to objects that are already written, so every sink for a directory's children must be finalized before it is created. Implementations are responsible for whatever that ordering requires of them — see nix::merkle::FileSinkBuilder::makeDirectorySink.

Member Function Documentation

◆ flush()

virtual void nix::merkle::FileSinkBuilder::flush ( )
pure virtual

Finish any writes that are still in progress.

Until this is called, objects written through this builder are not necessarily available to anything else that reads the same store.

Implemented in nix::GitRepoPoolImpl.

◆ makeDirectorySink()

virtual std::unique_ptr< DirectorySinkWithFinalize > nix::merkle::FileSinkBuilder::makeDirectorySink ( )
pure virtual

Create a sink for one directory.

Every sink handed out before this call must have been finalized: an implementation is free to assume that, and to do whatever work making earlier objects referenceable requires.

Implemented in nix::GitRepoPoolImpl.


The documentation for this struct was generated from the following file: