C++ Server-Side SDK
LaunchDarkly SDK
offline.hpp
1 #pragma once
2 
3 #include "../data_components/status_notifications/data_source_status_manager.hpp"
4 #include "../data_interfaces/system/idata_system.hpp"
5 
6 namespace launchdarkly::server_side::data_systems {
7 
9  public:
11  [[nodiscard]] std::shared_ptr<data_model::FlagDescriptor> GetFlag(
12  std::string const& key) const override;
13  [[nodiscard]] std::shared_ptr<data_model::SegmentDescriptor> GetSegment(
14  std::string const& key) const override;
15  [[nodiscard]] std::
16  unordered_map<std::string, std::shared_ptr<data_model::FlagDescriptor>>
17  AllFlags() const override;
18  [[nodiscard]] std::unordered_map<
19  std::string,
20  std::shared_ptr<data_model::SegmentDescriptor>>
21  AllSegments() const override;
22  [[nodiscard]] bool Initialized() const override;
23  [[nodiscard]] std::string const& Identity() const override;
24  void Initialize() override;
25 
26  private:
28 };
29 
30 } // namespace launchdarkly::server_side::data_systems
Definition: data_source_status_manager.hpp:16
IDataSystem obtains data used for flag evaluations and makes it available to other components.
Definition: idata_system.hpp:11
std::unordered_map< std::string, std::shared_ptr< data_model::SegmentDescriptor > > AllSegments() const override
Get a map of all segments.
Definition: offline.cpp:26
std::shared_ptr< data_model::FlagDescriptor > GetFlag(std::string const &key) const override
Get the flag named by key. Returns nullptr if no such flag exists.
Definition: offline.cpp:9
std::shared_ptr< data_model::SegmentDescriptor > GetSegment(std::string const &key) const override
Get the segment named by key. Returns nullptr if no such flag exists.
Definition: offline.cpp:14
void Initialize() override
Initializes the system. This method will be called before any of the IStore methods are called.
Definition: offline.cpp:31
bool Initialized() const override
Definition: offline.cpp:35
std::unordered_map< std::string, std::shared_ptr< data_model::FlagDescriptor > > AllFlags() const override
Get a map of all flags.
Definition: offline.cpp:20
std::string const & Identity() const override
Definition: offline.cpp:39