Valid values are all small strings, often static.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit
ff10064ab878e58afb1d2538b2086a2d4a41c017)
Conflicts:
src/rgw/rgw_sal_dbstore.h (trivial)
src/rgw/rgw_sal_motr.h (not exist)
src/rgw/rgw_sal_rados.cc (trivial)
src/rgw/rgw_sal_rados.h (trivial)
/** Get the current period ID for this zone */
virtual const std::string& get_current_period_id() = 0;
/** Get the tier type for the zone */
- virtual const std::string& get_tier_type() = 0;
+ virtual const std::string_view get_tier_type() = 0;
};
/**
virtual bool get_redirect_endpoint(std::string* endpoint) override;
virtual bool has_zonegroup_api(const std::string& api) const override;
virtual const std::string& get_current_period_id() override;
- virtual const std::string& get_tier_type() override { return "rgw"; }
+ virtual const std::string_view get_tier_type() override { return "rgw"; }
};
class DBLuaScriptManager : public LuaScriptManager {
return store->svc()->zone->get_current_period_id();
}
-const std::string& RadosZone::get_tier_type()
+const std::string_view RadosZone::get_tier_type()
{
return store->svc()->zone->get_zone().tier_type;
}
virtual bool get_redirect_endpoint(std::string* endpoint) override;
virtual bool has_zonegroup_api(const std::string& api) const override;
virtual const std::string& get_current_period_id() override;
- virtual const std::string& get_tier_type() override;
+ virtual const std::string_view get_tier_type() override;
};
class RadosStore : public Store {