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;
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;
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,
// 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 {