]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_service.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
4 #ifndef CEPH_RGW_SERVICE_H
5 #define CEPH_RGW_SERVICE_H
12 #include "rgw/rgw_common.h"
14 struct RGWServices_Def
;
16 class RGWServiceInstance
18 friend struct RGWServices_Def
;
27 } start_state
{StateInit
};
29 virtual void shutdown() {}
30 virtual int do_start() {
34 RGWServiceInstance(CephContext
*_cct
) : cct(_cct
) {}
35 virtual ~RGWServiceInstance() {}
39 return (start_state
== StateStarted
);
49 class RGWSI_Bucket_SObj
;
50 class RGWSI_Bucket_Sync
;
51 class RGWSI_Bucket_Sync_SObj
;
52 class RGWSI_BucketIndex
;
53 class RGWSI_BucketIndex_RADOS
;
54 class RGWSI_BILog_RADOS
;
56 class RGWSI_ConfigKey
;
57 class RGWSI_ConfigKey_RADOS
;
58 class RGWSI_DataLog_RADOS
;
61 class RGWSI_MetaBackend
;
62 class RGWSI_MetaBackend_SObj
;
63 class RGWSI_MetaBackend_OTP
;
68 class RGWSI_ZoneUtils
;
70 class RGWSI_SyncModules
;
72 class RGWSI_SysObj_Core
;
73 class RGWSI_SysObj_Cache
;
75 class RGWSI_User_RADOS
;
77 struct RGWServices_Def
79 bool can_shutdown
{false};
80 bool has_shutdown
{false};
82 std::unique_ptr
<RGWSI_Finisher
> finisher
;
83 std::unique_ptr
<RGWSI_Bucket_SObj
> bucket_sobj
;
84 std::unique_ptr
<RGWSI_Bucket_Sync_SObj
> bucket_sync_sobj
;
85 std::unique_ptr
<RGWSI_BucketIndex_RADOS
> bi_rados
;
86 std::unique_ptr
<RGWSI_BILog_RADOS
> bilog_rados
;
87 std::unique_ptr
<RGWSI_Cls
> cls
;
88 std::unique_ptr
<RGWSI_ConfigKey_RADOS
> config_key_rados
;
89 std::unique_ptr
<RGWSI_DataLog_RADOS
> datalog_rados
;
90 std::unique_ptr
<RGWSI_MDLog
> mdlog
;
91 std::unique_ptr
<RGWSI_Meta
> meta
;
92 std::unique_ptr
<RGWSI_MetaBackend_SObj
> meta_be_sobj
;
93 std::unique_ptr
<RGWSI_MetaBackend_OTP
> meta_be_otp
;
94 std::unique_ptr
<RGWSI_Notify
> notify
;
95 std::unique_ptr
<RGWSI_OTP
> otp
;
96 std::unique_ptr
<RGWSI_RADOS
> rados
;
97 std::unique_ptr
<RGWSI_Zone
> zone
;
98 std::unique_ptr
<RGWSI_ZoneUtils
> zone_utils
;
99 std::unique_ptr
<RGWSI_Quota
> quota
;
100 std::unique_ptr
<RGWSI_SyncModules
> sync_modules
;
101 std::unique_ptr
<RGWSI_SysObj
> sysobj
;
102 std::unique_ptr
<RGWSI_SysObj_Core
> sysobj_core
;
103 std::unique_ptr
<RGWSI_SysObj_Cache
> sysobj_cache
;
104 std::unique_ptr
<RGWSI_User_RADOS
> user_rados
;
109 int init(CephContext
*cct
, bool have_cache
, bool raw_storage
, bool run_sync
);
116 RGWServices_Def _svc
;
120 RGWSI_Finisher
*finisher
{nullptr};
121 RGWSI_Bucket
*bucket
{nullptr};
122 RGWSI_Bucket_SObj
*bucket_sobj
{nullptr};
123 RGWSI_Bucket_Sync
*bucket_sync
{nullptr};
124 RGWSI_Bucket_Sync_SObj
*bucket_sync_sobj
{nullptr};
125 RGWSI_BucketIndex
*bi
{nullptr};
126 RGWSI_BucketIndex_RADOS
*bi_rados
{nullptr};
127 RGWSI_BILog_RADOS
*bilog_rados
{nullptr};
128 RGWSI_Cls
*cls
{nullptr};
129 RGWSI_ConfigKey_RADOS
*config_key_rados
{nullptr};
130 RGWSI_ConfigKey
*config_key
{nullptr};
131 RGWSI_DataLog_RADOS
*datalog_rados
{nullptr};
132 RGWSI_MDLog
*mdlog
{nullptr};
133 RGWSI_Meta
*meta
{nullptr};
134 RGWSI_MetaBackend
*meta_be_sobj
{nullptr};
135 RGWSI_MetaBackend
*meta_be_otp
{nullptr};
136 RGWSI_Notify
*notify
{nullptr};
137 RGWSI_OTP
*otp
{nullptr};
138 RGWSI_RADOS
*rados
{nullptr};
139 RGWSI_Zone
*zone
{nullptr};
140 RGWSI_ZoneUtils
*zone_utils
{nullptr};
141 RGWSI_Quota
*quota
{nullptr};
142 RGWSI_SyncModules
*sync_modules
{nullptr};
143 RGWSI_SysObj
*sysobj
{nullptr};
144 RGWSI_SysObj_Cache
*cache
{nullptr};
145 RGWSI_SysObj_Core
*core
{nullptr};
146 RGWSI_User
*user
{nullptr};
148 int do_init(CephContext
*cct
, bool have_cache
, bool raw_storage
, bool run_sync
);
150 int init(CephContext
*cct
, bool have_cache
, bool run_sync
) {
151 return do_init(cct
, have_cache
, false, run_sync
);
154 int init_raw(CephContext
*cct
, bool have_cache
) {
155 return do_init(cct
, have_cache
, true, false);
162 class RGWMetadataManager
;
163 class RGWMetadataHandler
;
170 std::unique_ptr
<RGWMetadataManager
> mgr
;
171 std::unique_ptr
<RGWMetadataHandler
> bucket
;
172 std::unique_ptr
<RGWMetadataHandler
> bucket_instance
;
173 std::unique_ptr
<RGWMetadataHandler
> user
;
174 std::unique_ptr
<RGWMetadataHandler
> otp
;
180 std::unique_ptr
<RGWUserCtl
> user
;
181 std::unique_ptr
<RGWBucketCtl
> bucket
;
182 std::unique_ptr
<RGWOTPCtl
> otp
;
187 int init(RGWServices
& svc
);
191 CephContext
*cct
{nullptr};
192 RGWServices
*svc
{nullptr};
197 RGWMetadataManager
*mgr
{nullptr};
199 RGWMetadataHandler
*bucket
{nullptr};
200 RGWMetadataHandler
*bucket_instance
{nullptr};
201 RGWMetadataHandler
*user
{nullptr};
202 RGWMetadataHandler
*otp
{nullptr};
205 RGWUserCtl
*user
{nullptr};
206 RGWBucketCtl
*bucket
{nullptr};
207 RGWOTPCtl
*otp
{nullptr};
209 int init(RGWServices
*_svc
);