Valid values are all small strings, often static.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
/** Get the ID of the realm containing this zone */
virtual const std::string& get_realm_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 const RGWAccessKey& get_system_key() override;
virtual const std::string& get_realm_name() override;
virtual const std::string& get_realm_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 StoreLuaScriptManager {
virtual const RGWAccessKey& get_system_key() { return zone_params->system_key; }
virtual const std::string& get_realm_name() { return realm->get_name(); }
virtual const std::string& get_realm_id() { return realm->get_id(); }
- virtual const std::string& get_tier_type() { return "rgw"; }
+ virtual const std::string_view get_tier_type() { return "rgw"; }
friend class MotrStore;
};
return store->svc()->zone->get_realm().get_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 const RGWAccessKey& get_system_key() override;
virtual const std::string& get_realm_name() override;
virtual const std::string& get_realm_id() override;
- virtual const std::string& get_tier_type() override;
+ virtual const std::string_view get_tier_type() override;
};
class RadosStore : public StoreStore {