C++ Server-Side SDK
LaunchDarkly SDK
Public Member Functions | List of all members
launchdarkly::server_side::IDataSourceStatusProvider Class Referenceabstract

#include <data_source_status.hpp>

Public Member Functions

virtual DataSourceStatus Status () const =0
 
virtual std::unique_ptr< IConnectionOnDataSourceStatusChange (std::function< void(DataSourceStatus status)> handler)=0
 
virtual std::unique_ptr< IConnectionOnDataSourceStatusChangeEx (std::function< bool(DataSourceStatus status)> handler)=0
 
 IDataSourceStatusProvider (IDataSourceStatusProvider const &item)=delete
 
 IDataSourceStatusProvider (IDataSourceStatusProvider &&item)=delete
 
IDataSourceStatusProvideroperator= (IDataSourceStatusProvider const &)=delete
 
IDataSourceStatusProvideroperator= (IDataSourceStatusProvider &&)=delete
 

Detailed Description

Interface for accessing and listening to the data source status.

Member Function Documentation

◆ OnDataSourceStatusChange()

virtual std::unique_ptr<IConnection> launchdarkly::server_side::IDataSourceStatusProvider::OnDataSourceStatusChange ( std::function< void(DataSourceStatus status)>  handler)
pure virtual

Listen to changes to the data source status.

Parameters
handlerFunction which will be called with the new status.
Returns
A IConnection which can be used to stop listening to the status.

◆ OnDataSourceStatusChangeEx()

virtual std::unique_ptr<IConnection> launchdarkly::server_side::IDataSourceStatusProvider::OnDataSourceStatusChangeEx ( std::function< bool(DataSourceStatus status)>  handler)
pure virtual

Listen to changes to the data source status, with ability for listener to unregister itself.

Parameters
handlerFunction which will be called with the new status. Return true to unregister.
Returns
A IConnection which can be used to stop listening to the status.

◆ Status()

virtual DataSourceStatus launchdarkly::server_side::IDataSourceStatusProvider::Status ( ) const
pure virtual

The current status of the data source. Suitable for broadcast to data source status listeners.


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