|
C++ Server-Side SDK
LaunchDarkly SDK
|
#include <polling_initializer.hpp>


Public Member Functions | |
| FDv2PollingInitializer (boost::asio::any_io_executor const &executor, Logger const &logger, std::string const &polling_base_url, config::built::HttpProperties const &http_properties, data_model::Selector selector, std::optional< std::string > filter_key) | |
| async::Future< data_interfaces::FDv2SourceResult > | Run () override |
| void | Close () override |
| std::string const & | Identity () const override |
Public Member Functions inherited from launchdarkly::server_side::data_interfaces::IFDv2Initializer | |
| IFDv2Initializer (IFDv2Initializer const &)=delete | |
| IFDv2Initializer (IFDv2Initializer &&)=delete | |
| IFDv2Initializer & | operator= (IFDv2Initializer const &)=delete |
| IFDv2Initializer & | operator= (IFDv2Initializer &&)=delete |
FDv2 polling initializer. Makes a single HTTP GET to the FDv2 polling endpoint, parses the response via the FDv2 protocol state machine, and returns the result.
Threading model: Run() should only be called once at a time. Close() may be called concurrently with Run(). This object may be safely destroyed once no call to Run() or Close() is in progress.
| launchdarkly::server_side::data_systems::FDv2PollingInitializer::FDv2PollingInitializer | ( | boost::asio::any_io_executor const & | executor, |
| Logger const & | logger, | ||
| std::string const & | polling_base_url, | ||
| config::built::HttpProperties const & | http_properties, | ||
| data_model::Selector | selector, | ||
| std::optional< std::string > | filter_key | ||
| ) |
Constructs an initializer for a single poll request. If filter_key is present, only the specified payload filter is requested.
|
overridevirtual |
Unblocks any in-progress Run() call, causing it to return FDv2SourceResult::Shutdown.
Implements launchdarkly::server_side::data_interfaces::IFDv2Initializer.
|
overridevirtual |
Implements launchdarkly::server_side::data_interfaces::IFDv2Initializer.
|
overridevirtual |
Returns a Future that resolves with the result once the initializer completes. Called at most once per instance.
Close() may be called from another thread to unblock Run(), in which case the future resolves with FDv2SourceResult::Shutdown.
Implements launchdarkly::server_side::data_interfaces::IFDv2Initializer.