C++ Client-Side SDK
LaunchDarkly SDK
Public Member Functions | List of all members
launchdarkly::client_side::flag_manager::FlagUpdater Class Reference
Inheritance diagram for launchdarkly::client_side::flag_manager::FlagUpdater:
Inheritance graph
[legend]
Collaboration diagram for launchdarkly::client_side::flag_manager::FlagUpdater:
Collaboration graph
[legend]

Public Member Functions

 FlagUpdater (FlagStore &flag_store)
 
void Init (Context const &context, std::unordered_map< std::string, ItemDescriptor > data) override
 
void Upsert (Context const &context, std::string key, ItemDescriptor item) override
 
std::unique_ptr< IConnectionOnFlagChange (std::string const &key, std::function< void(std::shared_ptr< FlagValueChangeEvent >)> handler) override
 
- Public Member Functions inherited from launchdarkly::client_side::IDataSourceUpdateSink
 IDataSourceUpdateSink (IDataSourceUpdateSink const &item)=delete
 
 IDataSourceUpdateSink (IDataSourceUpdateSink &&item)=delete
 
IDataSourceUpdateSinkoperator= (IDataSourceUpdateSink const &)=delete
 
IDataSourceUpdateSinkoperator= (IDataSourceUpdateSink &&)=delete
 
- Public Member Functions inherited from launchdarkly::client_side::flag_manager::IFlagNotifier
virtual std::unique_ptr< IConnectionOnFlagChange (std::string const &key, ChangeHandler handler)=0
 
 IFlagNotifier (IFlagNotifier const &item)=delete
 
 IFlagNotifier (IFlagNotifier &&item)=delete
 
IFlagNotifieroperator= (IFlagNotifier const &)=delete
 
IFlagNotifieroperator= (IFlagNotifier &&)=delete
 

Additional Inherited Members

- Public Types inherited from launchdarkly::client_side::flag_manager::IFlagNotifier
using ChangeHandler = std::function< void(std::shared_ptr< FlagValueChangeEvent >)>
 

Member Function Documentation

◆ OnFlagChange()

std::unique_ptr< IConnection > launchdarkly::client_side::flag_manager::FlagUpdater::OnFlagChange ( std::string const &  key,
std::function< void(std::shared_ptr< FlagValueChangeEvent >)>  handler 
)
override

Listen for changes for the specific flag.

Parameters
keyThe flag to listen to.
handlerThe handler to signal when the flag changes.
Returns
A Connection which can be used to stop listening for changes to the flag using this handler.

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