1 #ifndef SOTA_CLIENT_TOOLS_REQUEST_POOL_H_ 2 #define SOTA_CLIENT_TOOLS_REQUEST_POOL_H_ 9 #include "ostree_object.h" 10 #include "rate_controller.h" 16 void AddQuery(
const OSTreeObject::ptr& request);
17 void AddUpload(
const OSTreeObject::ptr& request);
21 upload_queue_.clear();
23 bool is_idle()
const {
return query_queue_.empty() && upload_queue_.empty() && running_requests_ == 0; }
24 bool is_stopped()
const {
return stopped_; }
25 RunMode run_mode()
const {
return mode_; }
37 int head_requests_made() {
return head_requests_made_; }
38 uintmax_t total_object_size() {
return total_object_size_; }
45 int running_requests_;
46 int head_requests_made_{0};
47 int put_requests_made_{0};
48 uintmax_t total_object_size_{0};
51 std::list<OSTreeObject::ptr> query_queue_;
52 std::list<OSTreeObject::ptr> upload_queue_;
57 #endif // SOTA_CLIENT_TOOLS_REQUEST_POOL_H_
void Loop()
One iteration of request-listen loop, launches multiple requests, then listens for the result...
int put_requests_made()
The number of HEAD + PUT requests that have been sent to curl.
Control the rate of outgoing requests.
RunMode
Execution mode to run garage tools in.