Skip to content

Resolve "Support waiting for a transfer request to complete"

This MR enables Cargo to keep track of transfer status so that it can be reported back to users.

It also extends the Cargo API as follows:

  • Adds a new API function transfer_dataset() as a convenience function to request the transfer of a single dataset.
  • Adds a cargo::transfer_state enum with appropriate values that reflect a transfer's current status.
  • Adds a cargo::transfer_status class with functions state(), done(), failed() and error() to retrieve a transfer's current status and its associated error condition in case of failure.
  • Extends the existing cargo::transfer class with functions wait(), and wait_for(), to wait for the completion of a transfer request.
  • Promotes cargo::error_code from enum to a class to allow for more expressiveness of error conditions.
  • Adds new error codes: no_such_transfer and transfer_in_progress.
  • Adds new formatters: cargo::transfer_state and std::optional<T>.

Closes #10 (closed)

Edited by Alberto Miranda

Merge request reports