C++ Server-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
launchdarkly::server_side::data_systems::DataSourceEventHandler Class Reference

#include <event_handler.hpp>

Classes

struct  Delete
 
struct  Patch
 
struct  Put
 

Public Types

enum class  MessageStatus { kMessageHandled , kInvalidMessage , kUnhandledVerb }
 

Public Member Functions

 DataSourceEventHandler (data_interfaces::IDestination &handler, Logger const &logger, data_components::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 IDestination to process the parsed events.

This is only used for streaming. For server polling the shape of the poll response is different than the put, so there is limited utility in sharing this handler.

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::server_side::data_systems::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 event.
Returns
A status indicating if the message could be handled.

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