|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
Classes | |
| struct | TransferItem |
| struct | State |
| struct | TransferSource |
Public Member Functions | |
| void | unpause (const std::shared_ptr< TransferItem > &transfer) |
| void | cancel (const std::shared_ptr< TransferItem > &transfer) |
| curlFileTransfer (unsigned int baseRetryTimeMs) | |
| void | wakeup () |
| void | stopWorkerThread () |
| void | workerThreadMain () |
| void | workerThreadEntry () |
| void | enqueueItem (std::shared_ptr< TransferItem > item) |
| void | upload (const std::string &uri, std::string data, const Headers &headers) override |
| std::optional< std::pair< FileTransferResult, box_ptr< Source > > > | tryEagerTransfers (const std::string &uri, const Headers &headers, const std::optional< std::string > &data, bool noBody) |
| std::pair< FileTransferResult, box_ptr< Source > > | enqueueFileTransfer (const std::string &uri, const Headers &headers, std::optional< std::string > data, bool noBody) |
| bool | exists (const std::string &uri, const Headers &headers) override |
| std::pair< FileTransferResult, box_ptr< Source > > | download (const std::string &uri, const Headers &headers) override |
Public Attributes | |
| std::unique_ptr< CURLM, decltype([](auto *m) { curl_multi_cleanup(m);})> | curlm |
| const unsigned int | baseRetryTimeMs |
| Sync< State > | state_ |
| std::thread | workerThread |
Additional Inherited Members | |
| Public Types inherited from nix::FileTransfer | |
| enum | Error { NotFound , Forbidden , Misc , Transient , Interrupted } |
|
inlineoverridevirtual |
Download a file, returning its contents through a source. Will not return before the transfer has fully started, ensuring that any errors thrown by the setup phase (e.g. HTTP 404 or similar errors) are not postponed to be thrown by the returned source. The source will only throw errors detected during the transfer itself (decompression errors, connection drops, etc).
Implements nix::FileTransfer.
|
inlineoverridevirtual |
Checks whether the given URI exists. For historical reasons this function treats HTTP 403 responses like HTTP 404 responses and returns false for both. This was originally done to handle unlistable S3 buckets, which may return 403 (not 404) if the reuqested object doesn't exist in the bucket.
S3 objects are downloaded completely to answer this request.
Implements nix::FileTransfer.
|
inlineoverridevirtual |
Upload some data. May throw a FileTransferError exception.
Implements nix::FileTransfer.