Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::HttpBinaryCacheStoreConfig Struct Reference
Inheritance diagram for nix::HttpBinaryCacheStoreConfig:
nix::StoreConfig nix::BinaryCacheStoreConfig nix::StoreConfigBase nix::StoreDirConfig nix::StoreConfig nix::Config nix::StoreConfigBase nix::StoreDirConfig nix::AbstractConfig nix::Config nix::AbstractConfig nix::S3BinaryCacheStoreConfig nix::testing::TestHttpBinaryCacheStoreConfig

Public Member Functions

 HttpBinaryCacheStoreConfig (const Params &params)
 HttpBinaryCacheStoreConfig (ParsedURL cacheUri, const Store::Config::Params &params)
ref< Store > openStore (ref< FileTransfer > fileTransfer) const
ref< Store > openStore () const override
StoreReference getReference () const override
Public Member Functions inherited from nix::StoreConfig
 StoreConfig (const Params &params, FilePathType pathType)
StringMap getQueryParams () const
virtual bool getReadOnly () const
virtual const std::filesystem::path & getStateDir () const
virtual const std::filesystem::path & getLogDir () const
virtual std::string getHumanReadableURI () const
Public Member Functions inherited from nix::StoreConfigBase
 StoreConfigBase (const StoreReference::Params &params, FilePathType pathType)
Public Member Functions inherited from nix::Config
 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) const override
void resetOverridden () override
nlohmann::json toJSON () override
std::string toKeyValue (bool overriddenOnly=false) override
void convertToArgs (Args &args, const std::string &category) override
Public Member Functions inherited from nix::AbstractConfig
void applyConfig (const std::string &contents, const std::string &path="<unknown>")
void warnUnknownSettings ()
void reapplyUnknownSettings ()
Public Member Functions inherited from nix::StoreDirConfig
StorePath parseStorePath (std::string_view path) const
StorePath parseStorePathCanonical (std::string_view path) const
std::optional< StorePath > maybeParseStorePath (std::string_view path) const
std::string printStorePath (const StorePath &path) const
StringSet printStorePathSet (const StorePathSet &path) const
std::size_t maxCanonicalStorePathLen () const noexcept
bool isInStore (std::string_view path) const
bool isStorePath (std::string_view path) const
std::pair< StorePath, CanonPath > toStorePath (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 makeFixedOutputPathFromCA (std::string_view name, const ContentAddressWithReferences &ca) const
std::pair< StorePath, Hash > computeStorePath (std::string_view name, const SourcePath &path, ContentAddressMethod method=ContentAddressMethod::Raw::NixArchive, HashAlgorithm hashAlgo=HashAlgorithm::SHA256, const StorePathSet &references={}, PathFilter &filter=defaultPathFilter) const
Public Member Functions inherited from nix::BinaryCacheStoreConfig
 BinaryCacheStoreConfig (const Params &params)

Static Public Member Functions

static const std::string name ()
static StringSet uriSchemes ()
static std::string doc ()
Static Public Member Functions inherited from nix::StoreConfig
static StringSet getDefaultSystemFeatures ()
static std::string doc ()
static std::optional< ExperimentalFeature > experimentalFeature ()

Public Attributes

ParsedURL cacheUri
Setting< std::optional< CompressionAlgo > > narinfoCompression
Setting< std::optional< CompressionAlgo > > lsCompression
Setting< std::optional< CompressionAlgo > > logCompression
Setting< std::optional< AbsolutePath > > tlsCert
Setting< std::optional< AbsolutePath > > tlsKey
Setting< uint32_t > retryDelayMs
Setting< uint32_t > retryDelayRateLimitedMs
Setting< uint32_t > retryMaxDelayMs
Setting< uint32_t > retryAttempts
Public Attributes inherited from nix::StoreConfig
Setting< int > pathInfoCacheSize
Setting< bool > isTrusted
Setting< int > priority
Setting< bool > wantMassQuery
Setting< StringSet > systemFeatures
Public Attributes inherited from nix::StoreConfigBase
StoreDirSetting storeDir_
Public Attributes inherited from nix::StoreDirConfig
const std::string & storeDir
Public Attributes inherited from nix::BinaryCacheStoreConfig
Setting< CompressionAlgo > compression
Setting< bool > writeNARListing
Setting< bool > writeDebugInfo
Setting< std::optional< AbsolutePath > > secretKeyFile
Setting< std::string > secretKeyFiles
Setting< std::optional< AbsolutePath > > localNarCache
Setting< bool > parallelCompression
Setting< int > compressionLevel

Additional Inherited Members

Public Types inherited from nix::StoreConfig
using Params = StoreReference::Params
Public Types inherited from nix::Config
using Settings = std::map<std::string, SettingData>
Protected Types inherited from nix::StoreConfigBase
enum struct  FilePathType { Unix , Native }
Protected Member Functions inherited from nix::AbstractConfig
 AbstractConfig (StringMap initials={})
Protected Attributes inherited from nix::AbstractConfig
StringMap unknownSettings

Member Function Documentation

◆ getReference()

StoreReference nix::HttpBinaryCacheStoreConfig::getReference ( ) const
overridevirtual

Render the config back to a StoreReference. It should round-trip with resolveStoreConfig (for stores configs that are registered).

Reimplemented from nix::StoreConfig.

◆ openStore()

ref< Store > nix::HttpBinaryCacheStoreConfig::openStore ( ) const
overridevirtual

Open a store of the type corresponding to this configuration type.

Implements nix::StoreConfig.

Reimplemented in nix::S3BinaryCacheStoreConfig.

Member Data Documentation

◆ logCompression

Setting<std::optional<CompressionAlgo> > nix::HttpBinaryCacheStoreConfig::logCompression
Initial value:
{
this,
std::nullopt,
"log-compression",
R"(
Compression method for `log/*` files. It is recommended to
use a compression method supported by most web browsers
(e.g. `brotli`).
)"}

◆ lsCompression

Setting<std::optional<CompressionAlgo> > nix::HttpBinaryCacheStoreConfig::lsCompression
Initial value:
{
this, std::nullopt, "ls-compression", "Compression method for `.ls` files."}

◆ narinfoCompression

Setting<std::optional<CompressionAlgo> > nix::HttpBinaryCacheStoreConfig::narinfoCompression
Initial value:
{
this, std::nullopt, "narinfo-compression", "Compression method for `.narinfo` files."}

◆ retryAttempts

Setting<uint32_t> nix::HttpBinaryCacheStoreConfig::retryAttempts
Initial value:
{
this,
0,
"retry-attempts",
"Override [`filetransfer-retry-attempts`](@docroot@/command-ref/conf-file.md#conf-filetransfer-retry-attempts) for requests to this store."}

◆ retryDelayMs

Setting<uint32_t> nix::HttpBinaryCacheStoreConfig::retryDelayMs
Initial value:
{
this,
0,
"retry-delay",
"Override [`filetransfer-retry-delay`](@docroot@/command-ref/conf-file.md#conf-filetransfer-retry-delay) for requests to this store (milliseconds)."}

◆ retryDelayRateLimitedMs

Setting<uint32_t> nix::HttpBinaryCacheStoreConfig::retryDelayRateLimitedMs
Initial value:
{
this,
0,
"retry-delay-rate-limited",
"Override [`filetransfer-retry-delay-rate-limited`](@docroot@/command-ref/conf-file.md#conf-filetransfer-retry-delay-rate-limited) for requests to this store (milliseconds)."}

◆ retryMaxDelayMs

Setting<uint32_t> nix::HttpBinaryCacheStoreConfig::retryMaxDelayMs
Initial value:
{
this,
0,
"retry-max-delay",
"Override [`filetransfer-retry-max-delay`](@docroot@/command-ref/conf-file.md#conf-filetransfer-retry-max-delay) for requests to this store (milliseconds)."}

◆ tlsCert

Setting<std::optional<AbsolutePath> > nix::HttpBinaryCacheStoreConfig::tlsCert
Initial value:
{
this, std::nullopt, "tls-certificate", "Path to an optional TLS client certificate in PEM format."}

◆ tlsKey

Setting<std::optional<AbsolutePath> > nix::HttpBinaryCacheStoreConfig::tlsKey
Initial value:
{
this, std::nullopt, "tls-private-key", "Path to an optional TLS client certificate private key in PEM format."}

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