]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/pubsub: make v2-specific calls private
authorCasey Bodley <cbodley@redhat.com>
Fri, 8 Mar 2024 20:01:08 +0000 (15:01 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 10 Apr 2024 17:09:17 +0000 (13:09 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_pubsub.cc
src/rgw/rgw_pubsub.h

index 579142a84c7af8ddf8bf4ae998558941f33c5d86..36b04887edb04f7e22fc7a976496f2cd87109600 100644 (file)
@@ -962,9 +962,9 @@ int RGWPubSub::Bucket::remove_notifications(const DoutPrefixProvider *dpp, optio
   return 0;
 }
 
-int RGWPubSub::create_topic(const DoutPrefixProvider* dpp,
-                            const rgw_pubsub_topic& topic,
-                            optional_yield y) const {
+int RGWPubSub::create_topic_v2(const DoutPrefixProvider* dpp,
+                               const rgw_pubsub_topic& topic,
+                               optional_yield y) const {
   RGWObjVersionTracker objv_tracker;
   objv_tracker.generate_new_write_ver(dpp->get_cct());
   constexpr bool exclusive = false;
@@ -996,7 +996,7 @@ int RGWPubSub::create_topic(const DoutPrefixProvider* dpp,
     new_topic.arn = arn;
     new_topic.opaque_data = opaque_data;
     new_topic.policy_text = policy_text;
-    return create_topic(dpp, new_topic, y);
+    return create_topic_v2(dpp, new_topic, y);
   }
   RGWObjVersionTracker objv_tracker;
   rgw_pubsub_topics topics;
index 6891c6ebd159f467d7925d088c3a187b870bc19c..c394846f90112e15fa75dbd54b90c82068d35bfb 100644 (file)
@@ -562,6 +562,19 @@ class RGWPubSub
   int write_topics_v1(const DoutPrefixProvider *dpp, const rgw_pubsub_topics& topics,
                       RGWObjVersionTracker* objv_tracker, optional_yield y) const;
 
+  // remove a topic according to its name
+  // if the topic does not exists it is a no-op (considered success)
+  // return 0 on success, error code otherwise
+  int remove_topic_v2(const DoutPrefixProvider* dpp,
+                      const std::string& name,
+                      optional_yield y) const;
+  // create a topic with a name only
+  // if the topic already exists it is a no-op (considered success)
+  // return 0 on success, error code otherwise
+  int create_topic_v2(const DoutPrefixProvider* dpp,
+                      const rgw_pubsub_topic& topic,
+                      optional_yield y) const;
+
 public:
   RGWPubSub(rgw::sal::Driver* _driver,
             const std::string& _tenant,
@@ -641,18 +654,6 @@ public:
   // if the topic does not exists it is a no-op (considered success)
   // return 0 on success, error code otherwise
   int remove_topic(const DoutPrefixProvider *dpp, const std::string& name, optional_yield y) const;
-  // remove a topic according to its name
-  // if the topic does not exists it is a no-op (considered success)
-  // return 0 on success, error code otherwise
-  int remove_topic_v2(const DoutPrefixProvider* dpp,
-                      const std::string& name,
-                      optional_yield y) const;
-  // create a topic with a name only
-  // if the topic already exists it is a no-op (considered success)
-  // return 0 on success, error code otherwise
-  int create_topic(const DoutPrefixProvider* dpp,
-                   const rgw_pubsub_topic& topic,
-                   optional_yield y) const;
 };
 
 namespace rgw::notify {