#include <local-overlay-store.hh>
Public Member Functions | |
LocalOverlayStore (const Params ¶ms) | |
LocalOverlayStore (std::string_view scheme, PathView path, const Params ¶ms) | |
std::string | getUri () override |
![]() | |
LocalOverlayStoreConfig (const StringMap ¶ms) | |
LocalOverlayStoreConfig (std::string_view scheme, PathView path, const Params ¶ms) | |
const std::string | name () override |
std::optional< ExperimentalFeature > | experimentalFeature () const override |
std::string | doc () override |
![]() | |
LocalStoreConfig (std::string_view scheme, std::string_view authority, const Params ¶ms) | |
const std::string | name () override |
std::string | doc () override |
LocalFSStoreConfig (PathView path, const Params ¶ms) | |
![]() | |
LocalFSStoreConfig (PathView path, const Params ¶ms) | |
StoreConfig ()=delete | |
![]() | |
StoreDirConfig ()=delete | |
![]() | |
StorePath | parseStorePath (std::string_view path) const |
std::optional< StorePath > | maybeParseStorePath (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, Path > | toStorePath (PathView 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 | makeFixedOutputPathFromCA (std::string_view name, const ContentAddressWithReferences &ca) const |
std::pair< StorePath, Hash > | computeStorePath (std::string_view name, const SourcePath &path, ContentAddressMethod method=FileIngestionMethod::NixArchive, HashAlgorithm hashAlgo=HashAlgorithm::SHA256, const StorePathSet &references={}, PathFilter &filter=defaultPathFilter) const |
Config (StringMap initials={}) | |
![]() | |
Config (StringMap initials={}) | |
bool | set (const std::string &name, const std::string &value) override |
void | addSetting (AbstractSetting *setting) |
void | getSettings (std::map< std::string, SettingInfo > &res, bool overriddenOnly=false) override |
void | resetOverridden () override |
nlohmann::json | toJSON () override |
std::string | toKeyValue () override |
void | convertToArgs (Args &args, const std::string &category) override |
![]() | |
void | applyConfig (const std::string &contents, const std::string &path="<unknown>") |
void | warnUnknownSettings () |
void | reapplyUnknownSettings () |
![]() | |
LocalStore (const Params ¶ms) | |
LocalStore (std::string_view scheme, PathView path, const Params ¶ms) | |
std::string | getUri () override |
bool | isValidPathUncached (const StorePath &path) override |
StorePathSet | queryValidPaths (const StorePathSet &paths, SubstituteFlag maybeSubstitute=NoSubstitute) override |
StorePathSet | queryAllValidPaths () override |
void | queryPathInfoUncached (const StorePath &path, Callback< std::shared_ptr< const ValidPathInfo > > callback) noexcept override |
void | queryReferrers (const StorePath &path, StorePathSet &referrers) override |
StorePathSet | queryValidDerivers (const StorePath &path) override |
std::map< std::string, std::optional< StorePath > > | queryStaticPartialDerivationOutputMap (const StorePath &path) override |
std::optional< StorePath > | queryPathFromHashPart (const std::string &hashPart) override |
StorePathSet | querySubstitutablePaths (const StorePathSet &paths) override |
bool | pathInfoIsUntrusted (const ValidPathInfo &) override |
bool | realisationIsUntrusted (const Realisation &) override |
void | addToStore (const ValidPathInfo &info, Source &source, RepairFlag repair, CheckSigsFlag checkSigs) override |
StorePath | addToStoreFromDump (Source &dump, std::string_view name, FileSerialisationMethod dumpMethod, ContentAddressMethod hashMethod, HashAlgorithm hashAlgo, const StorePathSet &references, RepairFlag repair) override |
void | addTempRoot (const StorePath &path) override |
void | addIndirectRoot (const Path &path) override |
Roots | findRoots (bool censor) override |
void | collectGarbage (const GCOptions &options, GCResults &results) override |
void | optimiseStore (OptimiseStats &stats) |
void | optimiseStore () override |
void | optimisePath (const Path &path, RepairFlag repair) |
bool | verifyStore (bool checkContents, RepairFlag repair) override |
void | registerValidPath (const ValidPathInfo &info) |
unsigned int | getProtocol () override |
std::optional< TrustedFlag > | isTrustedClient () override |
void | vacuumDB () |
void | addSignatures (const StorePath &storePath, const StringSet &sigs) override |
void | autoGC (bool sync=true) |
void | registerDrvOutput (const Realisation &info) override |
void | registerDrvOutput (const Realisation &info, CheckSigsFlag checkSigs) override |
void | cacheDrvOutputMapping (State &state, const uint64_t deriver, const std::string &outputName, const StorePath &output) |
std::optional< const Realisation > | queryRealisation_ (State &state, const DrvOutput &id) |
std::optional< std::pair< int64_t, Realisation > > | queryRealisationCore_ (State &state, const DrvOutput &id) |
void | queryRealisationUncached (const DrvOutput &, Callback< std::shared_ptr< const Realisation > > callback) noexcept override |
std::optional< std::string > | getVersion () override |
![]() | |
Path | addPermRoot (const StorePath &storePath, const Path &gcRoot) override final |
![]() | |
LocalFSStore (const Params ¶ms) | |
void | narFromPath (const StorePath &path, Sink &sink) override |
ref< SourceAccessor > | getFSAccessor (bool requireValidPath=true) override |
virtual Path | getRealStoreDir () |
Path | toRealPath (const Path &storePath) override |
std::optional< std::string > | getBuildLogExact (const StorePath &path) override |
![]() | |
virtual void | init () |
Path | followLinksToStore (std::string_view path) const |
StorePath | followLinksToStorePath (std::string_view path) const |
bool | isValidPath (const StorePath &path) |
void | substitutePaths (const StorePathSet &paths) |
ref< const ValidPathInfo > | queryPathInfo (const StorePath &path) |
void | queryPathInfo (const StorePath &path, Callback< ref< const ValidPathInfo > > callback) noexcept |
std::optional< std::shared_ptr< const ValidPathInfo > > | queryPathInfoFromClientCache (const StorePath &path) |
std::shared_ptr< const Realisation > | queryRealisation (const DrvOutput &) |
void | queryRealisation (const DrvOutput &, Callback< std::shared_ptr< const Realisation > > callback) noexcept |
virtual StorePathSet | queryDerivationOutputs (const StorePath &path) |
virtual std::map< std::string, std::optional< StorePath > > | queryPartialDerivationOutputMap (const StorePath &path, Store *evalStore=nullptr) |
OutputPathMap | queryDerivationOutputMap (const StorePath &path, Store *evalStore=nullptr) |
virtual void | querySubstitutablePathInfos (const StorePathCAMap &paths, SubstitutablePathInfos &infos) |
virtual void | addMultipleToStore (Source &source, RepairFlag repair=NoRepair, CheckSigsFlag checkSigs=CheckSigs) |
virtual void | addMultipleToStore (PathsSource &&pathsToCopy, Activity &act, RepairFlag repair=NoRepair, CheckSigsFlag checkSigs=CheckSigs) |
virtual StorePath | addToStore (std::string_view name, const SourcePath &path, ContentAddressMethod method=ContentAddressMethod::Raw::NixArchive, HashAlgorithm hashAlgo=HashAlgorithm::SHA256, const StorePathSet &references=StorePathSet(), PathFilter &filter=defaultPathFilter, RepairFlag repair=NoRepair) |
ValidPathInfo | addToStoreSlow (std::string_view name, const SourcePath &path, ContentAddressMethod method=ContentAddressMethod::Raw::NixArchive, HashAlgorithm hashAlgo=HashAlgorithm::SHA256, const StorePathSet &references=StorePathSet(), std::optional< Hash > expectedCAHash={}) |
virtual void | buildPaths (const std::vector< DerivedPath > &paths, BuildMode buildMode=bmNormal, std::shared_ptr< Store > evalStore=nullptr) |
virtual std::vector< KeyedBuildResult > | buildPathsWithResults (const std::vector< DerivedPath > &paths, BuildMode buildMode=bmNormal, std::shared_ptr< Store > evalStore=nullptr) |
virtual BuildResult | buildDerivation (const StorePath &drvPath, const BasicDerivation &drv, BuildMode buildMode=bmNormal) |
virtual void | ensurePath (const StorePath &path) |
std::string | makeValidityRegistration (const StorePathSet &paths, bool showDerivers, bool showHash) |
virtual void | repairPath (const StorePath &path) |
Derivation | derivationFromPath (const StorePath &drvPath) |
Derivation | readDerivation (const StorePath &drvPath) |
Derivation | readInvalidDerivation (const StorePath &drvPath) |
virtual void | computeFSClosure (const StorePathSet &paths, StorePathSet &out, bool flipDirection=false, bool includeOutputs=false, bool includeDerivers=false) |
void | computeFSClosure (const StorePath &path, StorePathSet &out, bool flipDirection=false, bool includeOutputs=false, bool includeDerivers=false) |
virtual void | queryMissing (const std::vector< DerivedPath > &targets, StorePathSet &willBuild, StorePathSet &willSubstitute, StorePathSet &unknown, uint64_t &downloadSize, uint64_t &narSize) |
StorePaths | topoSortPaths (const StorePathSet &paths) |
void | exportPaths (const StorePathSet &paths, Sink &sink) |
void | exportPath (const StorePath &path, Sink &sink) |
StorePaths | importPaths (Source &source, CheckSigsFlag checkSigs=CheckSigs) |
const Stats & | getStats () |
StorePathSet | exportReferences (const StorePathSet &storePaths, const StorePathSet &inputPaths) |
std::optional< StorePath > | getBuildDerivationPath (const StorePath &) |
void | clearPathInfoCache () |
virtual void | connect () |
Path | toRealPath (const StorePath &storePath) |
virtual void | setOptions () |
![]() | |
std::optional< std::string > | getBuildLog (const StorePath &path) |
Additional Inherited Members | |
![]() | |
using | Params = StoreReference::Params |
![]() | |
using | Settings = std::map<std::string, SettingData> |
![]() | |
using | PathsSource = std::vector<std::pair<ValidPathInfo, std::unique_ptr<Source>>> |
![]() | |
static std::set< std::string > | uriSchemes () |
![]() | |
static std::set< std::string > | uriSchemes () |
![]() | |
static StringSet | getDefaultSystemFeatures () |
![]() | |
static LogStore & | require (Store &store) |
![]() | |
const Setting< std::string > | lowerStoreUri |
const PathSetting | upperLayer |
Setting< bool > | checkMount |
const PathSetting | remountHook |
![]() | |
Setting< bool > | requireSigs |
Setting< bool > | readOnly |
![]() | |
const OptionalPathSetting | rootDir |
const PathSetting | stateDir |
const PathSetting | logDir |
const PathSetting | realStoreDir |
![]() | |
const Setting< int > | pathInfoCacheSize |
const Setting< bool > | isTrusted |
Setting< int > | priority |
Setting< bool > | wantMassQuery |
Setting< StringSet > | systemFeatures |
![]() | |
const PathSetting | storeDir_ |
const Path | storeDir = storeDir_ |
![]() | |
const Path | dbDir |
const Path | linksDir |
const Path | reservedPath |
const Path | schemaPath |
const Path | tempRootsDir |
const Path | fnTempRoots |
PathSet | locksHeld |
![]() | |
static std::string | operationName = "Indirect GC roots registration" |
![]() | |
static std::string | operationName = "Local Filesystem Store" |
static const std::string | drvsLogDir = "drvs" |
![]() | |
static constexpr const char * | MissingName = "x" |
![]() | |
static std::string | operationName = "Garbage collection" |
![]() | |
static std::string | operationName = "Build log storage and retrieval" |
![]() | |
Path | toUpperPath (const StorePath &path) |
![]() | |
AbstractConfig (StringMap initials={}) | |
![]() | |
void | verifyPath (const StorePath &path, std::function< bool(const StorePath &)> existsInStoreDir, StorePathSet &done, StorePathSet &validPaths, RepairFlag repair, bool &errors) |
![]() | |
void | makeSymlink (const Path &link, const Path &target) |
![]() | |
Store (const Params ¶ms) | |
void | unsupported (const std::string &op) |
![]() | |
StringMap | unknownSettings |
![]() | |
SharedSync< State > | state |
std::shared_ptr< NarInfoDiskCache > | diskCache |
Stats | stats |
Variation of local store using OverlayFS for the store directory.
Documentation on overridden methods states how they differ from their LocalStore
counterparts.
|
inlineoverridevirtual |
StoreConfig
one we store enough information in those to recover the scheme and authority in all cases. Implements nix::Store.