3 #include <launchdarkly/context.hpp>
4 #include <launchdarkly/data/evaluation_detail.hpp>
5 #include <launchdarkly/server_side/config/config.hpp>
6 #include <launchdarkly/value.hpp>
8 #include <launchdarkly/server_side/all_flags_state.hpp>
9 #include <launchdarkly/server_side/data_source_status.hpp>
15 #include <unordered_map>
17 namespace launchdarkly::server_side {
106 std::string event_name,
108 double metric_value) = 0;
119 std::string event_name,
154 bool default_value) = 0;
166 bool default_value) = 0;
178 std::string default_value) = 0;
191 std::string default_value) = 0;
203 double default_value) = 0;
216 double default_value) = 0;
228 int default_value) = 0;
240 int default_value) = 0;
252 Value default_value) = 0;
265 Value default_value) = 0;
299 std::string event_name,
301 double metric_value)
override;
305 void Track(
Context const& ctx, std::string event_name)
override;
313 bool default_value)
override;
317 bool default_value)
override;
321 std::string default_value)
override;
326 std::string default_value)
override;
330 double default_value)
override;
335 double default_value)
override;
339 int default_value)
override;
343 int default_value)
override;
347 Value default_value)
override;
351 Value default_value)
override;
359 [[nodiscard]]
static char const*
Version();
362 inline static char const*
const kVersion =
364 std::unique_ptr<IClient> client;
Definition: context.hpp:29
Definition: evaluation_detail.hpp:18
Definition: all_flags_state.hpp:27
Options
Definition: all_flags_state.hpp:29
Definition: client.hpp:284
EvaluationDetail< int > IntVariationDetail(Context const &ctx, FlagKey const &key, int default_value) override
Definition: client.cpp:109
bool Initialized() const override
Definition: client.cpp:28
EvaluationDetail< bool > BoolVariationDetail(Context const &ctx, FlagKey const &key, bool default_value) override
Definition: client.cpp:72
void FlushAsync() override
Definition: client.cpp:58
std::future< bool > StartAsync() override
Definition: client.cpp:32
bool BoolVariation(Context const &ctx, FlagKey const &key, bool default_value) override
Definition: client.cpp:66
IDataSourceStatusProvider & DataSourceStatus() override
Definition: client.cpp:127
std::string StringVariation(Context const &ctx, FlagKey const &key, std::string default_value) override
Definition: client.cpp:78
Value JsonVariation(Context const &ctx, FlagKey const &key, Value default_value) override
Definition: client.cpp:115
double DoubleVariation(Context const &ctx, FlagKey const &key, double default_value) override
Definition: client.cpp:91
void Identify(Context context) override
Definition: client.cpp:62
EvaluationDetail< std::string > StringVariationDetail(Context const &ctx, FlagKey const &key, std::string default_value) override
Definition: client.cpp:84
EvaluationDetail< double > DoubleVariationDetail(Context const &ctx, FlagKey const &key, double default_value) override
Definition: client.cpp:97
void Track(Context const &ctx, std::string event_name, Value data, double metric_value) override
Definition: client.cpp:43
EvaluationDetail< Value > JsonVariationDetail(Context const &ctx, FlagKey const &key, Value default_value) override
Definition: client.cpp:121
static char const * Version()
Definition: client.cpp:131
int IntVariation(Context const &ctx, FlagKey const &key, int default_value) override
Definition: client.cpp:103
Definition: client.hpp:21
virtual IDataSourceStatusProvider & DataSourceStatus()=0
virtual EvaluationDetail< std::string > StringVariationDetail(Context const &ctx, FlagKey const &key, std::string default_value)=0
virtual void FlushAsync()=0
virtual std::string StringVariation(Context const &ctx, FlagKey const &key, std::string default_value)=0
std::string FlagKey
Definition: client.hpp:26
virtual bool BoolVariation(Context const &ctx, FlagKey const &key, bool default_value)=0
virtual Value JsonVariation(Context const &ctx, FlagKey const &key, Value default_value)=0
virtual void Track(Context const &ctx, std::string event_name, Value data, double metric_value)=0
virtual EvaluationDetail< int > IntVariationDetail(Context const &ctx, FlagKey const &key, int default_value)=0
virtual void Track(Context const &ctx, std::string event_name, Value data)=0
virtual std::future< bool > StartAsync()=0
virtual void Track(Context const &ctx, std::string event_name)=0
virtual int IntVariation(Context const &ctx, FlagKey const &key, int default_value)=0
virtual EvaluationDetail< double > DoubleVariationDetail(Context const &ctx, FlagKey const &key, double default_value)=0
virtual bool Initialized() const =0
virtual void Identify(Context context)=0
virtual EvaluationDetail< bool > BoolVariationDetail(Context const &ctx, FlagKey const &key, bool default_value)=0
virtual double DoubleVariation(Context const &ctx, FlagKey const &key, double default_value)=0
virtual EvaluationDetail< Value > JsonVariationDetail(Context const &ctx, FlagKey const &key, Value default_value)=0
Definition: data_source_status.hpp:69