Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::FileTransferSettings Struct Reference
Inheritance diagram for nix::FileTransferSettings:
nix::Config nix::AbstractConfig

Public Attributes

Setting< bool > enableHttp2
 
Setting< std::string > userAgentSuffix
 
Setting< size_thttpConnections
 
Setting< unsigned long > connectTimeout
 
Setting< unsigned long > stalledDownloadTimeout
 
Setting< unsigned inttries
 
Setting< size_tdownloadBufferSize
 

Additional Inherited Members

- Public Types inherited from nix::Config
using Settings = std::map<std::string, SettingData>
 
- 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) override
 
void resetOverridden () override
 
nlohmann::json toJSON () override
 
std::string toKeyValue () 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 ()
 
- Protected Member Functions inherited from nix::AbstractConfig
 AbstractConfig (StringMap initials={})
 
- Protected Attributes inherited from nix::AbstractConfig
StringMap unknownSettings
 

Member Data Documentation

◆ connectTimeout

Setting<unsigned long> nix::FileTransferSettings::connectTimeout
Initial value:
{
this, 0, "connect-timeout",
R"(
The timeout (in seconds) for establishing connections in the
binary cache substituter. It corresponds to `curl`’s
`--connect-timeout` option. A value of 0 means no limit.
)"}

◆ downloadBufferSize

Setting<size_t> nix::FileTransferSettings::downloadBufferSize
Initial value:
{this, 64 * 1024 * 1024, "download-buffer-size",
R"(
The size of Nix's internal download buffer in bytes during `curl` transfers. If data is
not processed quickly enough to exceed the size of this buffer, downloads may stall.
The default is 67108864 (64 MiB).
)"}

◆ enableHttp2

Setting<bool> nix::FileTransferSettings::enableHttp2
Initial value:
{this, true, "http2",
"Whether to enable HTTP/2 support."}

◆ httpConnections

Setting<size_t> nix::FileTransferSettings::httpConnections
Initial value:
{
this, 25, "http-connections",
R"(
The maximum number of parallel TCP connections used to fetch
files from binary caches and by other downloads. It defaults
to 25. 0 means no limit.
)",
{"binary-caches-parallel-connections"}}

◆ stalledDownloadTimeout

Setting<unsigned long> nix::FileTransferSettings::stalledDownloadTimeout
Initial value:
{
this, 300, "stalled-download-timeout",
R"(
The timeout (in seconds) for receiving data from servers
during download. Nix cancels idle downloads after this
timeout's duration.
)"}

◆ tries

Setting<unsigned int> nix::FileTransferSettings::tries
Initial value:
{this, 5, "download-attempts",
"How often Nix will attempt to download a file before giving up."}

◆ userAgentSuffix

Setting<std::string> nix::FileTransferSettings::userAgentSuffix
Initial value:
{this, "", "user-agent-suffix",
"String appended to the user agent in HTTP requests."}

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