C++ Server-Side SDK
LaunchDarkly SDK
Classes | Public Member Functions | List of all members
launchdarkly::server_side::data_systems::Conditions Class Referencefinal

#include <conditions.hpp>

Public Member Functions

 Conditions (std::vector< std::unique_ptr< data_interfaces::IFDv2Condition >> conditions)
 
 Conditions (Conditions const &)=delete
 
 Conditions (Conditions &&)=delete
 
Conditionsoperator= (Conditions const &)=delete
 
Conditionsoperator= (Conditions &&)=delete
 
async::Future< data_interfaces::IFDv2Condition::TypeGetFuture (async::CancellationToken token)
 
void Inform (data_interfaces::FDv2SourceResult const &result)
 
void Close ()
 

Detailed Description

Aggregates a set of conditions into a single Future that resolves with the type of the first condition to fire. Inform() and Close() forward to every underlying condition. If constructed with no conditions, GetFuture() returns a Future that never resolves (until Close).

Thread-safe: GetFuture, Inform, and Close may be called from any thread.

Member Function Documentation

◆ GetFuture()

async::Future< IFDv2Condition::Type > launchdarkly::server_side::data_systems::Conditions::GetFuture ( async::CancellationToken  token)

Returns a fresh Future that resolves with the type of the first condition to fire. The caller must cancel the source corresponding to token once the result is no longer needed, so that the per-call Promise (and its registered continuations) can be released.


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