C++ Client-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
data_source_event_handler.hpp
1#pragma once
2
3#include <boost/asio/any_io_executor.hpp>
4
5#include "data_source_status_manager.hpp"
6#include "data_source_update_sink.hpp"
7
8#include <launchdarkly/config/shared/built/service_endpoints.hpp>
9#include <launchdarkly/context.hpp>
10#include <launchdarkly/data/evaluation_result.hpp>
11#include <launchdarkly/logging/logger.hpp>
12
13namespace launchdarkly::client_side::data_sources {
14
23 public:
28 enum class MessageStatus {
29 kMessageHandled,
30 kInvalidMessage,
31 kUnhandledVerb
32 };
33
37 struct PatchData {
38 std::string key;
40 };
41
45 struct DeleteData {
46 std::string key;
47 uint64_t version;
48 };
49
50 DataSourceEventHandler(Context const& context,
51 IDataSourceUpdateSink& handler,
52 Logger const& logger,
53 DataSourceStatusManager& status_manager);
54
61 MessageStatus HandleMessage(std::string const& type,
62 std::string const& data);
63
64 private:
65 IDataSourceUpdateSink& handler_;
66 Logger const& logger_;
67 DataSourceStatusManager& status_manager_;
68 Context context_;
69};
70} // namespace launchdarkly::client_side::data_sources
Definition context.hpp:29
Definition evaluation_result.hpp:15
Definition data_source_update_sink.hpp:21
Definition data_source_event_handler.hpp:22
MessageStatus
Definition data_source_event_handler.hpp:28
MessageStatus HandleMessage(std::string const &type, std::string const &data)
Definition data_source_event_handler.cpp:84
Definition data_source_status_manager.hpp:17