C++ Client-Side SDK
LaunchDarkly SDK
data_source_update_sink.hpp
1 #pragma once
2 
3 #include <optional>
4 #include <ostream>
5 #include <string>
6 #include <unordered_map>
7 
8 #include <launchdarkly/client_side/data_source_status.hpp>
9 #include <launchdarkly/config/shared/built/service_endpoints.hpp>
10 #include <launchdarkly/context.hpp>
11 #include <launchdarkly/data/evaluation_result.hpp>
12 #include <launchdarkly/data_model/item_descriptor.hpp>
13 
14 namespace launchdarkly::client_side {
15 
16 using ItemDescriptor = data_model::ItemDescriptor<EvaluationResult>;
17 
22  public:
23  virtual void Init(Context const& context,
24  std::unordered_map<std::string, ItemDescriptor> data) = 0;
25  virtual void Upsert(Context const& context,
26  std::string key,
27  ItemDescriptor item) = 0;
28 
29  IDataSourceUpdateSink(IDataSourceUpdateSink const& item) = delete;
31  IDataSourceUpdateSink& operator=(IDataSourceUpdateSink const&) = delete;
32  IDataSourceUpdateSink& operator=(IDataSourceUpdateSink&&) = delete;
33  virtual ~IDataSourceUpdateSink() = default;
34 
35  protected:
36  IDataSourceUpdateSink() = default;
37 };
38 
39 } // namespace launchdarkly::client_side
Definition: context.hpp:29
Definition: data_source_update_sink.hpp:21