ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
Go to the documentation of this file.
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;
91 virtual boost::signals2::connection
ConnectProgress(SigProgress::slot_type
const& slot) = 0;
148 [[nodiscard]] boost::future<int>
Initiate()
override;
153 boost::signals2::connection
ConnectProgress(SigProgress::slot_type
const& slot)
override;
161 #endif // #ifndef DAQ_PROCESS_RSYNC_ASYNC_PROCESS_HPP
virtual ~RsyncAsyncProcessIf()
float speed
Transfer speed in bytes/sec.
virtual ~RsyncAsyncProcess()
std::optional< RsyncProgress > ParseRsyncProgress(std::string const &line) noexcept
Parse progress update from rsync.
virtual boost::signals2::connection ConnectProgress(SigProgress::slot_type const &slot)=0
Connect to progress signal.
std::optional< std::string > rsync
Binary to use.
RsyncAsyncProcess(boost::asio::io_context &ctx, std::string source, std::string dest, RsyncOptions const &opts={}, DryRun flag=DryRun::Disabled)
Construct async operation.
Options controlling rsync invocation.
boost::future< int > Initiate() override
Progress update signal.
Represents an rsync process as an asynchronous operation.
float progress
Progress as fraction of 1 (complete == 1.0)
std::optional< bool > whole_file
Transfer with/without delta xfer algorithm.
std::optional< std::chrono::seconds > timeout
I/O timeout.
daq::AsyncProcess class definition
boost::signals2::connection ConnectProgress(SigProgress::slot_type const &slot) override
Connect to progress signal.
boost::signals2::signal< void(pid_t, RsyncProgress const &)> SigProgress
Progress update signal.
std::chrono::seconds remaining
Estimated remaining time.
More specialized version for rsync which also monitors transfer progress.
uint64_t transferred
Number of transferred bytes.
std::optional< unsigned > bw_limit
Enables rate-limiting in kb/s.
Describes file transfer progress,.
Interface to asynchronous process.
std::optional< bool > inplace
–inplace/–no-inplace
Represents a subprocess as an asynchronous operation.