C++ Client-Side SDK
LaunchDarkly SDK
All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Public Types | Public Member Functions | List of all members
launchdarkly::client_side::data_sources::DataSourceEventHandler Class Reference

#include <data_source_event_handler.hpp>

Classes

struct  DeleteData
 
struct  PatchData
 

Public Types

enum class  MessageStatus { kMessageHandled , kInvalidMessage , kUnhandledVerb }
 

Public Member Functions

 DataSourceEventHandler (Context const &context, IDataSourceUpdateSink &handler, Logger const &logger, DataSourceStatusManager &status_manager)
 
MessageStatus HandleMessage (std::string const &type, std::string const &data)
 

Detailed Description

This class handles LaunchDarkly events, parses them, and then uses a IDataSourceUpdateSink to process the parsed events.

This can be used for streaming or for polling. For polling only "put" events will be used.

Member Enumeration Documentation

◆ MessageStatus

Status indicating if the message was processed, or if there was an issue encountered.

Member Function Documentation

◆ HandleMessage()

DataSourceEventHandler::MessageStatus launchdarkly::client_side::data_sources::DataSourceEventHandler::HandleMessage ( std::string const &  type,
std::string const &  data 
)

Handles an event from the LaunchDarkly service.

Parameters
typeThe type of the event. "put"/"patch"/"delete".
dataThe content of the evnet.
Returns
A status indicating if the message could be handled.

The documentation for this class was generated from the following files: