Nix  2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::UDSRemoteStore Class Reference
Inheritance diagram for nix::UDSRemoteStore:
[legend]
Collaboration diagram for nix::UDSRemoteStore:
[legend]

Public Member Functions

 UDSRemoteStore (UDSRemoteStoreConfig config)
 
 UDSRemoteStore (const std::string scheme, std::string path, UDSRemoteStoreConfig config)
 
UDSRemoteStoreConfigconfig () override
 
const UDSRemoteStoreConfigconfig () const override
 
std::string getUri () override
 
ref< FSAccessorgetFSAccessor () override
 
kj::Promise< Result< box_ptr< Source > > > narFromPath (const StorePath &path) override
 
kj::Promise< Result< void > > addIndirectRoot (const Path &path) override
 
- Public Member Functions inherited from nix::IndirectRootStore
kj::Promise< Result< Path > > addPermRoot (const StorePath &storePath, const Path &gcRoot) override final
 
- Public Member Functions inherited from nix::LocalFSStore
virtual Path getRealStoreDir ()
 
Path toRealPath (const Path &storePath) override
 
kj::Promise< Result< std::optional< std::string > > > getBuildLogExact (const StorePath &path) override
 
- Public Member Functions inherited from nix::Store
virtual kj::Promise< Result< void > > init ()
 
StorePath parseStorePath (std::string_view path) const
 
std::optional< StorePathmaybeParseStorePath (std::string_view path) const
 
std::string printStorePath (const StorePath &path) const
 
StorePathSet parseStorePathSet (const PathSet &paths) const
 
PathSet printStorePathSet (const StorePathSet &path) const
 
std::string showPaths (const StorePathSet &paths)
 
bool isInStore (PathView path) const
 
bool isStorePath (std::string_view path) const
 
std::pair< StorePath, PathtoStorePath (PathView path) const
 
Path followLinksToStore (std::string_view path) const
 
StorePath followLinksToStorePath (std::string_view path) const
 
StorePath makeStorePath (std::string_view type, std::string_view hash, std::string_view name) const
 
StorePath makeStorePath (std::string_view type, const Hash &hash, std::string_view name) const
 
StorePath makeOutputPath (std::string_view id, const Hash &hash, std::string_view name) const
 
StorePath makeFixedOutputPath (std::string_view name, const FixedOutputInfo &info) const
 
StorePath makeTextPath (std::string_view name, const TextInfo &info) const
 
StorePath makeFixedOutputPathFromCA (std::string_view name, const ContentAddressWithReferences &ca) const
 
StorePath computeStorePathForPathRecursive (std::string_view name, const PreparedDump &source) const
 
StorePath computeStorePathForPathFlat (std::string_view name, const Path &srcPath) const
 
StorePath computeStorePathForText (std::string_view name, std::string_view s, const StorePathSet &references) const
 
kj::Promise< Result< bool > > isValidPath (const StorePath &path)
 
kj::Promise< Result< void > > substitutePaths (const StorePathSet &paths)
 
kj::Promise< Result< ref< const ValidPathInfo > > > queryPathInfo (const StorePath &path)
 
kj::Promise< Result< std::shared_ptr< const Realisation > > > queryRealisation (const DrvOutput &)
 
virtual bool pathInfoIsUntrusted (const ValidPathInfo &)
 
virtual bool realisationIsUntrusted (const Realisation &)
 
virtual kj::Promise< Result< std::map< std::string, std::optional< StorePath > > > > queryStaticPartialDerivationOutputMap (const StorePath &path)
 
kj::Promise< Result< OutputPathMap > > queryDerivationOutputMap (const StorePath &path, Store *evalStore=nullptr)
 
virtual kj::Promise< Result< StorePath > > addToStoreRecursive (std::string_view name, const PreparedDump &source, HashType hashAlgo=HashType::SHA256, RepairFlag repair=NoRepair)
 
virtual kj::Promise< Result< StorePath > > addToStoreFlat (std::string_view name, const Path &srcPath, HashType hashAlgo=HashType::SHA256, RepairFlag repair=NoRepair)
 
kj::Promise< Result< ValidPathInfo > > addToStoreSlow (std::string_view name, const Path &srcPath, FileIngestionMethod method=FileIngestionMethod::Recursive, HashType hashAlgo=HashType::SHA256, std::optional< Hash > expectedCAHash={})
 
virtual kj::Promise< Result< void > > registerDrvOutput (const Realisation &output, CheckSigsFlag checkSigs)
 
kj::Promise< Result< std::string > > makeValidityRegistration (const StorePathSet &paths, bool showDerivers, bool showHash)
 
kj::Promise< Result< JSON > > pathInfoToJSON (const StorePathSet &storePaths, bool includeImpureInfo, bool showClosureSize, Base hashBase=Base::Base32, AllowInvalidFlag allowInvalid=DisallowInvalid)
 
kj::Promise< Result< std::pair< uint64_t, uint64_t > > > getClosureSize (const StorePath &storePath)
 
kj::Promise< Result< Derivation > > derivationFromPath (const StorePath &drvPath)
 
kj::Promise< Result< Derivation > > readDerivation (const StorePath &drvPath)
 
kj::Promise< Result< Derivation > > readInvalidDerivation (const StorePath &drvPath)
 
virtual kj::Promise< Result< void > > computeFSClosure (const StorePathSet &paths, StorePathSet &out, bool flipDirection=false, bool includeOutputs=false, bool includeDerivers=false)
 
kj::Promise< Result< void > > computeFSClosure (const StorePath &path, StorePathSet &out, bool flipDirection=false, bool includeOutputs=false, bool includeDerivers=false)
 
kj::Promise< Result< StorePaths > > topoSortPaths (const StorePathSet &paths)
 
kj::Promise< Result< void > > exportPaths (const StorePathSet &paths, Sink &sink)
 
kj::Promise< Result< void > > exportPath (const StorePath &path, Sink &sink)
 
kj::Promise< Result< StorePaths > > importPaths (Source &source, CheckSigsFlag checkSigs=CheckSigs)
 
kj::Promise< Result< Stats<> > > getStats ()
 
kj::Promise< Result< StorePathSet > > exportReferences (const StorePathSet &storePaths, const StorePathSet &inputPaths)
 
kj::Promise< Result< std::optional< StorePath > > > getBuildDerivationPath (const StorePath &)
 
kj::Promise< void > clearPathInfoCache ()
 
Path toRealPath (const StorePath &storePath)
 
- Public Member Functions inherited from nix::LogStore
kj::Promise< Result< std::optional< std::string > > > getBuildLog (const StorePath &path)
 
- Public Member Functions inherited from nix::RemoteStore
 RemoteStore (const RemoteStoreConfig &config)
 
kj::Promise< Result< bool > > isValidPathUncached (const StorePath &path) override
 
kj::Promise< Result< StorePathSet > > queryValidPaths (const StorePathSet &paths, SubstituteFlag maybeSubstitute=NoSubstitute) override
 
kj::Promise< Result< StorePathSet > > queryAllValidPaths () override
 
kj::Promise< Result< std::shared_ptr< const ValidPathInfo > > > queryPathInfoUncached (const StorePath &path) override
 
kj::Promise< Result< void > > queryReferrers (const StorePath &path, StorePathSet &referrers) override
 
kj::Promise< Result< StorePathSet > > queryValidDerivers (const StorePath &path) override
 
kj::Promise< Result< StorePathSet > > queryDerivationOutputs (const StorePath &path) override
 
kj::Promise< Result< std::map< std::string, std::optional< StorePath > > > > queryPartialDerivationOutputMap (const StorePath &path, Store *evalStore=nullptr) override
 
kj::Promise< Result< std::optional< StorePath > > > queryPathFromHashPart (const std::string &hashPart) override
 
kj::Promise< Result< StorePathSet > > querySubstitutablePaths (const StorePathSet &paths) override
 
kj::Promise< Result< void > > querySubstitutablePathInfos (const StorePathCAMap &paths, SubstitutablePathInfos &infos) override
 
kj::Promise< Result< ref< const ValidPathInfo > > > addCAToStore (AsyncInputStream &dump, std::string_view name, ContentAddressMethod caMethod, HashType hashType, const StorePathSet &references, RepairFlag repair)
 
kj::Promise< Result< StorePath > > addToStoreFromDump (AsyncInputStream &dump, std::string_view name, FileIngestionMethod method=FileIngestionMethod::Recursive, HashType hashAlgo=HashType::SHA256, RepairFlag repair=NoRepair, const StorePathSet &references=StorePathSet()) override
 
kj::Promise< Result< void > > addToStore (const ValidPathInfo &info, AsyncInputStream &nar, RepairFlag repair, CheckSigsFlag checkSigs) override
 
kj::Promise< Result< void > > addMultipleToStore (PathsSource &pathsToCopy, Activity &act, RepairFlag repair, CheckSigsFlag checkSigs) override
 
kj::Promise< Result< StorePath > > addTextToStore (std::string_view name, std::string_view s, const StorePathSet &references, RepairFlag repair) override
 
kj::Promise< Result< void > > registerDrvOutput (const Realisation &info) override
 
kj::Promise< Result< std::shared_ptr< const Realisation > > > queryRealisationUncached (const DrvOutput &) override
 
kj ::Promise< Result< void > > buildPaths (const std::vector< DerivedPath > &paths, BuildMode buildMode, std::shared_ptr< Store > evalStore) override
 
kj::Promise< Result< std::vector< KeyedBuildResult > > > buildPathsWithResults (const std::vector< DerivedPath > &paths, BuildMode buildMode, std::shared_ptr< Store > evalStore) override
 
kj ::Promise< Result< BuildResult > > buildDerivation (const StorePath &drvPath, const BasicDerivation &drv, BuildMode buildMode) override
 
kj::Promise< Result< void > > ensurePath (const StorePath &path) override
 
kj::Promise< Result< void > > addTempRoot (const StorePath &path) override
 
kj::Promise< Result< Roots > > findRoots (bool censor) override
 
kj::Promise< Result< void > > collectGarbage (const GCOptions &options, GCResults &results) override
 
kj::Promise< Result< void > > optimiseStore () override
 
kj::Promise< Result< bool > > verifyStore (bool checkContents, RepairFlag repair) override
 
kj::Promise< Result< void > > repairPath (const StorePath &path) override
 
kj::Promise< Result< void > > addSignatures (const StorePath &storePath, const StringSet &sigs) override
 
kj::Promise< Result< void > > queryMissing (const std::vector< DerivedPath > &targets, StorePathSet &willBuild, StorePathSet &willSubstitute, StorePathSet &unknown, uint64_t &downloadSize, uint64_t &narSize) override
 
kj::Promise< Result< void > > addBuildLog (const StorePath &drvPath, std::string_view log) override
 
kj::Promise< Result< std::optional< std::string > > > getVersion () override
 
kj::Promise< Result< void > > connect () override
 
kj::Promise< Result< unsigned int > > getProtocol () override
 
kj::Promise< Result< std::optional< TrustedFlag > > > isTrustedClient () override
 
ref< ConnectionopenConnectionWrapper ()
 

Static Public Member Functions

static std::set< std::string > uriSchemes ()
 
- Static Public Member Functions inherited from nix::LogStore
static LogStorerequire (Store &store)
 

Additional Inherited Members

- Public Types inherited from nix::Store
using PathsSource
 
- Static Public Attributes inherited from nix::IndirectRootStore
static std::string operationName = "Indirect GC roots registration"
 
- Static Public Attributes inherited from nix::LocalFSStore
static std::string operationName = "Local Filesystem Store"
 
static const std::string drvsLogDir = "drvs"
 
- Static Public Attributes inherited from nix::Store
static constexpr const char * MissingName = "x"
 
- Static Public Attributes inherited from nix::GcStore
static std::string operationName = "Garbage collection"
 
- Static Public Attributes inherited from nix::LogStore
static std::string operationName = "Build log storage and retrieval"
 
- Protected Member Functions inherited from nix::Store
 Store (const StoreConfig &config)
 
void unsupported (const std::string &op)
 
- Protected Member Functions inherited from nix::RemoteStore
void initConnection (Connection &conn)
 
virtual void setOptions (Connection &conn)
 
kj::Promise< Result< void > > setOptions () override
 
kj::Promise< Result< ConnectionHandle > > getConnection ()
 
- Protected Attributes inherited from nix::Store
Sync< State, AsyncMutex > state
 
std::shared_ptr< NarInfoDiskCachediskCache
 
Stats< std::atomic > stats
 
- Protected Attributes inherited from nix::RemoteStore
ref< Pool< Connection > > connections
 

Member Function Documentation

◆ addIndirectRoot()

kj::Promise< Result< void > > nix::UDSRemoteStore::addIndirectRoot ( const Path & path)
overridevirtual

Implementation of IndirectRootStore::addIndirectRoot() which delegates to the remote store.

The idea is that the client makes the direct symlink, so it is owned managed by the client's user account, and the server makes the indirect symlink.

Implements nix::IndirectRootStore.

◆ config() [1/2]

const UDSRemoteStoreConfig & nix::UDSRemoteStore::config ( ) const
inlineoverridevirtual

Implements nix::LocalFSStore.

◆ config() [2/2]

UDSRemoteStoreConfig & nix::UDSRemoteStore::config ( )
inlineoverridevirtual

Implements nix::LocalFSStore.

◆ getFSAccessor()

ref< FSAccessor > nix::UDSRemoteStore::getFSAccessor ( )
inlineoverridevirtual
Returns
An object to access files in the Nix store.

Reimplemented from nix::LocalFSStore.

◆ getUri()

std::string nix::UDSRemoteStore::getUri ( )
overridevirtual

Implements nix::Store.

◆ narFromPath()

kj::Promise< Result< box_ptr< Source > > > nix::UDSRemoteStore::narFromPath ( const StorePath & path)
inlineoverridevirtual

Generate a NAR dump of a store path.

Reimplemented from nix::LocalFSStore.


The documentation for this class was generated from the following files: