10#ifndef DAQ_PROCESS_RSYNC_ASYNC_PROCESS_HPP
11#define DAQ_PROCESS_RSYNC_ASYNC_PROCESS_HPP
19#include <boost/signals2/signal.hpp>
32 std::optional<std::string>
rsync;
49 std::optional<std::chrono::seconds>
timeout;
53 std::optional<std::filesystem::path>
logfile;
95 virtual boost::signals2::connection
ConnectProgress(SigProgress::slot_type
const& slot) = 0;
152 [[nodiscard]] boost::future<int>
Initiate()
override;
157 boost::signals2::connection
ConnectProgress(SigProgress::slot_type
const& slot)
override;
daq::AsyncProcess class definition
Interface to asynchronous process.
Represents a subprocess as an asynchronous operation.
More specialized version for rsync which also monitors transfer progress.
virtual ~RsyncAsyncProcessIf()
virtual boost::signals2::connection ConnectProgress(SigProgress::slot_type const &slot)=0
Connect to progress signal.
boost::signals2::signal< void(pid_t, RsyncProgress const &)> SigProgress
Progress update signal.
Represents an rsync process as an asynchronous operation.
boost::future< int > Initiate() override
Progress update signal.
virtual ~RsyncAsyncProcess()
RsyncAsyncProcessIf::SigProgress SigProgress
Progress update signal.
boost::signals2::connection ConnectProgress(SigProgress::slot_type const &slot) override
Connect to progress signal.
std::optional< std::string > rsync
Binary to use.
std::optional< std::chrono::seconds > timeout
I/O timeout.
std::optional< bool > inplace
–inplace/–no-inplace
std::optional< bool > whole_file
Transfer with/without delta xfer algorithm.
std::chrono::seconds remaining
Estimated remaining time.
std::optional< RsyncProgress > ParseRsyncProgress(std::string const &line) noexcept
Parse progress update from rsync.
float progress
Progress as fraction of 1 (complete == 1.0)
uint64_t transferred
Number of transferred bytes.
float speed
Transfer speed in bytes/sec.
std::optional< std::filesystem::path > logfile
Log file.
std::optional< unsigned > bw_limit
Enables rate-limiting in kb/s.
Options controlling rsync invocation.
Describes file transfer progress,.