]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
9f95a23c | 2 | // vim: ts=8 sw=2 smarttab ft=cpp |
7c673cae FG |
3 | |
4 | #ifndef RGW_REQUEST_H | |
5 | #define RGW_REQUEST_H | |
6 | ||
7 | #include "rgw_common.h" | |
7c673cae FG |
8 | #include "rgw_acl.h" |
9 | #include "rgw_user.h" | |
10 | #include "rgw_op.h" | |
7c673cae FG |
11 | |
12 | #include "common/QueueRing.h" | |
13 | ||
14 | #include <atomic> | |
15 | ||
16 | struct RGWRequest | |
17 | { | |
18 | uint64_t id; | |
19 | struct req_state *s; | |
7c673cae | 20 | RGWOp *op; |
7c673cae FG |
21 | |
22 | explicit RGWRequest(uint64_t id) : id(id), s(NULL), op(NULL) {} | |
23 | ||
24 | virtual ~RGWRequest() {} | |
25 | ||
26 | void init_state(req_state *_s) { | |
27 | s = _s; | |
28 | } | |
7c673cae FG |
29 | }; /* RGWRequest */ |
30 | ||
7c673cae | 31 | struct RGWLoadGenRequest : public RGWRequest { |
20effc67 TL |
32 | std::string method; |
33 | std::string resource; | |
7c673cae | 34 | int content_length; |
31f18b77 | 35 | std::atomic<bool>* fail_flag = nullptr; |
7c673cae | 36 | |
20effc67 | 37 | RGWLoadGenRequest(uint64_t req_id, const std::string& _m, const std::string& _r, int _cl, |
31f18b77 | 38 | std::atomic<bool> *ff) |
7c673cae FG |
39 | : RGWRequest(req_id), method(_m), resource(_r), content_length(_cl), |
40 | fail_flag(ff) {} | |
41 | }; | |
42 | ||
43 | #endif /* RGW_REQUEST_H */ |