From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- src/rgw/rgw_sync_module_pubsub.h | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/rgw/rgw_sync_module_pubsub.h (limited to 'src/rgw/rgw_sync_module_pubsub.h') diff --git a/src/rgw/rgw_sync_module_pubsub.h b/src/rgw/rgw_sync_module_pubsub.h new file mode 100644 index 000000000..8acc1a626 --- /dev/null +++ b/src/rgw/rgw_sync_module_pubsub.h @@ -0,0 +1,43 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab ft=cpp + +#ifndef CEPH_RGW_SYNC_MODULE_PUBSUB_H +#define CEPH_RGW_SYNC_MODULE_PUBSUB_H + +#include "rgw_sync_module.h" + +class RGWPSSyncModule : public RGWSyncModule { +public: + RGWPSSyncModule() {} + bool supports_data_export() override { + return false; + } + bool supports_writes() override { + return true; + } + int create_instance(CephContext *cct, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) override; +}; + +class RGWPSDataSyncModule; +class RGWRESTConn; + +class RGWPSSyncModuleInstance : public RGWSyncModuleInstance { + std::unique_ptr data_handler; + JSONFormattable effective_conf; +public: + RGWPSSyncModuleInstance(CephContext *cct, const JSONFormattable& config); + ~RGWPSSyncModuleInstance() = default; + RGWDataSyncModule *get_data_handler() override; + RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) override; + bool supports_user_writes() override { + return true; + } + const JSONFormattable& get_effective_conf() { + return effective_conf; + } + // start with full sync based on configuration + // default to incremental only + virtual bool should_full_sync() const override; +}; + +#endif -- cgit v1.2.3