// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
-
-#ifndef CEPH_RGW_AUTH_REGISTRY_H
-#define CEPH_RGW_AUTH_REGISTRY_H
+#pragma once
#include <functional>
#include <memory>
s3_main_strategy_boto2_t s3_main_strategy_boto2;
s3_main_strategy_t(CephContext* const cct,
- ImplicitTenants& implicit_tenant_context,
- rgw::sal::Store* store)
- : s3_main_strategy_plain(cct, implicit_tenant_context, store),
- s3_main_strategy_boto2(cct, implicit_tenant_context, store) {
+ const ImplicitTenants& implicit_tenant_context,
+ rgw::sal::Driver* driver)
+ : s3_main_strategy_plain(cct, implicit_tenant_context, driver),
+ s3_main_strategy_boto2(cct, implicit_tenant_context, driver) {
add_engine(Strategy::Control::SUFFICIENT, s3_main_strategy_plain);
add_engine(Strategy::Control::FALLBACK, s3_main_strategy_boto2);
}
public:
StrategyRegistry(CephContext* const cct,
- ImplicitTenants& implicit_tenant_context,
- rgw::sal::Store* store)
- : s3_main_strategy(cct, implicit_tenant_context, store),
- s3_post_strategy(cct, implicit_tenant_context, store),
- swift_strategy(cct, implicit_tenant_context, store),
- sts_strategy(cct, implicit_tenant_context, store) {
+ const ImplicitTenants& implicit_tenant_context,
+ rgw::sal::Driver* driver)
+ : s3_main_strategy(cct, implicit_tenant_context, driver),
+ s3_post_strategy(cct, implicit_tenant_context, driver),
+ swift_strategy(cct, implicit_tenant_context, driver),
+ sts_strategy(cct, implicit_tenant_context, driver) {
}
const s3_main_strategy_t& get_s3_main() const {
return sts_strategy;
}
- static std::shared_ptr<StrategyRegistry>
+ static std::unique_ptr<StrategyRegistry>
create(CephContext* const cct,
- ImplicitTenants& implicit_tenant_context,
- rgw::sal::Store* store) {
- return std::make_shared<StrategyRegistry>(cct, implicit_tenant_context, store);
+ const ImplicitTenants& implicit_tenant_context,
+ rgw::sal::Driver* driver) {
+ return std::make_unique<StrategyRegistry>(cct, implicit_tenant_context, driver);
}
};
} /* namespace rgw */
using rgw_auth_registry_t = rgw::auth::StrategyRegistry;
-using rgw_auth_registry_ptr_t = std::shared_ptr<rgw_auth_registry_t>;
-
-#endif /* CEPH_RGW_AUTH_REGISTRY_H */
+using rgw_auth_registry_ptr_t = std::unique_ptr<rgw_auth_registry_t>;