C++ Client-Side SDK
LaunchDarkly SDK
Public Member Functions | List of all members
launchdarkly::client_side::data_sources::IDataSourceStatusProvider Class Referenceabstract

#include <data_source_status.hpp>

Public Member Functions

virtual DataSourceStatus Status () const =0
 
virtual std::unique_ptr< IConnectionOnDataSourceStatusChange (std::function< void(data_sources::DataSourceStatus status)> handler)=0
 
virtual std::unique_ptr< IConnectionOnDataSourceStatusChangeEx (std::function< bool(data_sources::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::client_side::data_sources::IDataSourceStatusProvider::OnDataSourceStatusChange ( std::function< void(data_sources::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::client_side::data_sources::IDataSourceStatusProvider::OnDataSourceStatusChangeEx ( std::function< bool(data_sources::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::client_side::data_sources::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: