C++ Client-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
src
data_sources
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
13
namespace
launchdarkly::client_side::data_sources {
14
22
class
DataSourceEventHandler
{
23
public
:
28
enum class
MessageStatus
{
29
kMessageHandled,
30
kInvalidMessage,
31
kUnhandledVerb
32
};
33
37
struct
PatchData
{
38
std::string key;
39
EvaluationResult
flag;
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
launchdarkly::Context
Definition
context.hpp:29
launchdarkly::EvaluationResult
Definition
evaluation_result.hpp:15
launchdarkly::client_side::IDataSourceUpdateSink
Definition
data_source_update_sink.hpp:21
launchdarkly::client_side::data_sources::DataSourceEventHandler
Definition
data_source_event_handler.hpp:22
launchdarkly::client_side::data_sources::DataSourceEventHandler::MessageStatus
MessageStatus
Definition
data_source_event_handler.hpp:28
launchdarkly::client_side::data_sources::DataSourceEventHandler::HandleMessage
MessageStatus HandleMessage(std::string const &type, std::string const &data)
Definition
data_source_event_handler.cpp:84
launchdarkly::client_side::data_sources::DataSourceStatusManager
Definition
data_source_status_manager.hpp:17
launchdarkly::client_side::data_sources::DataSourceEventHandler::DeleteData
Definition
data_source_event_handler.hpp:45
launchdarkly::client_side::data_sources::DataSourceEventHandler::PatchData
Definition
data_source_event_handler.hpp:37
Generated by
1.9.8