-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathclient_impl.cpp
More file actions
673 lines (580 loc) · 25.8 KB
/
client_impl.cpp
File metadata and controls
673 lines (580 loc) · 25.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
#include "client_impl.hpp"
#include "all_flags_state/all_flags_state_builder.hpp"
#include "data_systems/background_sync/background_sync_system.hpp"
#include "data_systems/lazy_load/lazy_load_system.hpp"
#include "data_systems/offline.hpp"
#include "evaluation/evaluation_stack.hpp"
#include "prereq_event_recorder/prereq_event_recorder.hpp"
#include "data_interfaces/system/idata_system.hpp"
#include <launchdarkly/config/shared/built/http_properties.hpp>
#include <launchdarkly/encoding/sha_256.hpp>
#include <launchdarkly/events/asio_event_processor.hpp>
#include <launchdarkly/events/data/common_events.hpp>
#include <launchdarkly/logging/console_backend.hpp>
#include <launchdarkly/logging/null_logger.hpp>
#include <launchdarkly/server_side/config/builders/all_builders.hpp>
#include <launchdarkly/server_side/config/built/all_built.hpp>
#include <chrono>
#include <optional>
#include <utility>
namespace launchdarkly::server_side {
using EventProcessor = events::AsioEventProcessor<config::builders::SDK>;
// The ASIO implementation assumes that the io_context will be run from a
// single thread, and applies several optimisations based on this
// assumption.
auto const kAsioConcurrencyHint = 1;
// Client's destructor attempts to gracefully shut down the datasource
// connection in this amount of time.
auto const kDataSourceShutdownWait = std::chrono::milliseconds(100);
// Hook method names
// Method names for hooks
static const std::string kMethodBoolVariation = "BoolVariation";
static const std::string kMethodBoolVariationDetail = "BoolVariationDetail";
static const std::string kMethodStringVariation = "StringVariation";
static const std::string kMethodStringVariationDetail = "StringVariationDetail";
static const std::string kMethodDoubleVariation = "DoubleVariation";
static const std::string kMethodDoubleVariationDetail = "DoubleVariationDetail";
static const std::string kMethodIntVariation = "IntVariation";
static const std::string kMethodIntVariationDetail = "IntVariationDetail";
static const std::string kMethodJsonVariation = "JsonVariation";
static const std::string kMethodJsonVariationDetail = "JsonVariationDetail";
static std::unique_ptr<data_interfaces::IDataSystem> MakeDataSystem(
config::built::HttpProperties const& http_properties,
Config const& config,
boost::asio::any_io_executor const& executor,
data_components::DataSourceStatusManager& status_manager,
Logger& logger) {
if (config.DataSystemConfig().disabled) {
return std::make_unique<data_systems::OfflineSystem>(status_manager);
}
auto const builder =
config::builders::HttpPropertiesBuilder(http_properties);
auto data_source_properties = builder.Build();
return std::visit(
[&](auto&& arg) -> std::unique_ptr<data_interfaces::IDataSystem> {
using T = std::decay_t<decltype(arg)>;
if constexpr (std::is_same_v<T,
config::built::BackgroundSyncConfig>) {
return std::make_unique<data_systems::BackgroundSync>(
config.ServiceEndpoints(), arg, data_source_properties,
executor, status_manager, logger);
} else if constexpr (std::is_same_v<
T, config::built::LazyLoadConfig>) {
return std::make_unique<data_systems::LazyLoad>(logger, arg,
status_manager);
}
},
config.DataSystemConfig().system_);
}
static Logger MakeLogger(config::built::Logging const& config) {
if (config.disable_logging) {
return {std::make_shared<logging::NullLoggerBackend>()};
}
if (config.backend) {
return {config.backend};
}
return {
std::make_shared<logging::ConsoleBackend>(config.level, config.tag)};
}
std::unique_ptr<EventProcessor> MakeEventProcessor(
Config const& config,
boost::asio::any_io_executor const& exec,
config::built::HttpProperties const& http_properties,
Logger& logger) {
if (config.Events().Enabled()) {
return std::make_unique<EventProcessor>(exec, config.ServiceEndpoints(),
config.Events(),
http_properties, logger);
}
return nullptr;
}
/**
* Returns true if the flag pointer is valid and the underlying item is
* present.
*/
bool IsFlagPresent(
std::shared_ptr<data_model::FlagDescriptor> const& flag_desc);
ClientImpl::ClientImpl(Config config, std::string const& version)
: config_(config),
http_properties_(
config::builders::HttpPropertiesBuilder(config.HttpProperties())
.Header("user-agent", "CPPServer/" + version)
.Header("authorization", config.SdkKey())
.Header("x-launchdarkly-tags", config.ApplicationTag())
.Build()),
logger_(MakeLogger(config.Logging())),
ioc_(kAsioConcurrencyHint),
work_(boost::asio::make_work_guard(ioc_)),
status_manager_(),
data_system_(MakeDataSystem(http_properties_,
config_,
ioc_.get_executor(),
status_manager_,
logger_)),
event_processor_(MakeEventProcessor(config,
ioc_.get_executor(),
http_properties_,
logger_)),
evaluator_(logger_, *data_system_),
events_default_(event_processor_.get(), EventFactory::WithoutReasons()),
events_with_reasons_(event_processor_.get(),
EventFactory::WithReasons()) {
LD_LOG(logger_, LogLevel::kDebug)
<< "data system: " << data_system_->Identity();
if (auto custom_ca = http_properties_.Tls().CustomCAFile()) {
LD_LOG(logger_, LogLevel::kInfo)
<< "TLS peer verification configured with custom CA file: "
<< *custom_ca;
}
if (http_properties_.Tls().PeerVerifyMode() ==
launchdarkly::config::shared::built::TlsOptions::VerifyMode::
kVerifyNone) {
LD_LOG(logger_, LogLevel::kInfo) << "TLS peer verification disabled";
}
run_thread_ = std::move(std::thread([&]() { ioc_.run(); }));
}
void ClientImpl::Identify(Context context) {
events_default_.Send([&](EventFactory const& factory) {
return factory.Identify(std::move(context));
});
}
std::future<bool> ClientImpl::StartAsync() {
auto pr = std::make_shared<std::promise<bool>>();
auto fut = pr->get_future();
status_manager_.OnDataSourceStatusChangeEx([this, pr](auto _) {
if (data_system_->Initialized()) {
pr->set_value(true);
return true; /* delete this change listener since the
desired state was reached */
}
return false; /* keep the change listener */
});
data_system_->Initialize();
return fut;
}
bool ClientImpl::Initialized() const {
return data_system_->Initialized();
}
AllFlagsState ClientImpl::AllFlagsState(Context const& context,
AllFlagsState::Options options) {
std::unordered_map<Client::FlagKey, Value> result;
if (!Initialized()) {
if (data_system_->CanEvaluateWhenNotInitialized()) {
LD_LOG(logger_, LogLevel::kWarn)
<< "AllFlagsState() called before LaunchDarkly client "
"initialization completed; using last known values "
"from data store";
} else {
LD_LOG(logger_, LogLevel::kWarn)
<< "AllFlagsState() called before client has finished "
"initializing. Data source not available. Returning "
"empty state";
return {};
}
}
AllFlagsStateBuilder builder{options};
auto all_flags = data_system_->AllFlags();
// Because evaluating the flags may access many segments, tell the data
// system to fetch them all at once up-front. This may be a no-op
// depending on the data system (e.g. if the segments are all already in
// memory.)
auto _ = data_system_->AllSegments();
for (auto const& [key, v] : all_flags) {
if (!v || !v->item) {
continue;
}
auto const& flag = *(v->item);
if (IsSet(options, AllFlagsState::Options::ClientSideOnly) &&
!flag.clientSideAvailability.usingEnvironmentId) {
continue;
}
PrereqEventRecorder recorder{key};
EvaluationDetail<Value> detail = evaluator_.Evaluate(
flag, context,
EventScope{&recorder, EventFactory::WithoutReasons()});
bool in_experiment = flag.IsExperimentationEnabled(detail.Reason());
builder.AddFlag(key, detail.Value(),
AllFlagsState::State{
flag.Version(), detail.VariationIndex(),
detail.Reason(), flag.trackEvents || in_experiment,
in_experiment, flag.debugEventsUntilDate,
std::move(recorder).TakePrerequisites()});
}
return builder.Build();
}
void ClientImpl::TrackInternal(Context const& ctx,
std::string event_name,
std::optional<Value> data,
std::optional<double> metric_value,
hooks::HookContext const& hook_context) {
if (!ctx.Valid()) {
LD_LOG(logger_, LogLevel::kWarn) << "Track method called with an invalid context";
return;
}
// Execute afterTrack hooks before moving the data
// Typically we would execute this after the data has been enqueued.
// In this SDK doing so would introduce a performance penalty because we
// would need to copy the event_name and data.
// In this SDK the data is type-safe, and will be enqueued, so it makes
// minimal functional difference.
if (!config_.Hooks().empty()) {
hooks::TrackSeriesContext series_context(ctx, event_name, metric_value,
data, hook_context, std::nullopt);
hooks::ExecuteAfterTrack(config_.Hooks(), series_context, logger_);
}
events_default_.Send([&](EventFactory const& factory) {
return factory.Custom(ctx, std::move(event_name), std::move(data),
metric_value);
});
}
void ClientImpl::Track(Context const& ctx,
std::string event_name,
Value data,
double metric_value) {
static hooks::HookContext empty_hook_context;
this->TrackInternal(ctx, std::move(event_name), std::move(data),
metric_value, empty_hook_context);
}
void ClientImpl::Track(Context const& ctx,
std::string event_name,
Value data,
double metric_value,
hooks::HookContext const& hook_context) {
this->TrackInternal(ctx, std::move(event_name), std::move(data),
metric_value, hook_context);
}
void ClientImpl::Track(Context const& ctx, std::string event_name, Value data) {
static hooks::HookContext empty_hook_context;
this->TrackInternal(ctx, std::move(event_name), std::move(data),
std::nullopt, empty_hook_context);
}
void ClientImpl::Track(Context const& ctx,
std::string event_name,
Value data,
hooks::HookContext const& hook_context) {
this->TrackInternal(ctx, std::move(event_name), std::move(data),
std::nullopt, hook_context);
}
void ClientImpl::Track(Context const& ctx, std::string event_name) {
static hooks::HookContext empty_hook_context;
this->TrackInternal(ctx, std::move(event_name), std::nullopt, std::nullopt,
empty_hook_context);
}
void ClientImpl::Track(Context const& ctx,
std::string event_name,
hooks::HookContext const& hook_context) {
this->TrackInternal(ctx, std::move(event_name), std::nullopt, std::nullopt,
hook_context);
}
void ClientImpl::FlushAsync() {
if (event_processor_) {
event_processor_->FlushAsync();
}
}
void ClientImpl::LogVariationCall(std::string const& key,
bool flag_present) const {
if (Initialized()) {
if (!flag_present) {
LD_LOG(logger_, LogLevel::kInfo) << "Unknown feature flag " << key
<< "; returning default value";
}
} else {
if (flag_present) {
LD_LOG(logger_, LogLevel::kInfo)
<< "LaunchDarkly client has not yet been initialized; using "
"last "
"known flag rules from data store";
} else {
LD_LOG(logger_, LogLevel::kInfo)
<< "LaunchDarkly client has not yet been initialized; "
"returning default value";
}
}
}
Value ClientImpl::Variation(Context const& ctx,
enum Value::Type value_type,
IClient::FlagKey const& key,
Value const& default_value,
hooks::HookContext const& hook_context,
std::string const& method_name) {
auto result = *VariationInternal(ctx, key, default_value, events_default_,
hook_context, method_name);
if (result.Type() != value_type) {
return default_value;
}
return result;
}
EvaluationDetail<Value> ClientImpl::VariationInternal(
Context const& context,
IClient::FlagKey const& key,
Value const& default_value,
EventScope const& event_scope,
hooks::HookContext const& hook_context,
std::string const& method_name) {
// Execute beforeEvaluation hooks
std::optional<hooks::EvaluationSeriesExecutor> executor;
if (!config_.Hooks().empty()) {
hooks::EvaluationSeriesContext series_context(
key, context, default_value, method_name, hook_context, std::nullopt);
// Executor only created if there are hooks.
executor.emplace(config_.Hooks(), logger_);
executor->BeforeEvaluation(series_context);
}
if (auto error = PreEvaluationChecks(context)) {
auto detail = PostEvaluation(key, context, default_value, *error,
event_scope, std::nullopt);
// Execute afterEvaluation hooks
if (executor) {
hooks::EvaluationSeriesContext series_context(
key, context, default_value, method_name, hook_context, std::nullopt);
executor->AfterEvaluation(series_context, detail);
}
return detail;
}
auto flag_rule = data_system_->GetFlag(key);
bool flag_present = IsFlagPresent(flag_rule);
LogVariationCall(key, flag_present);
if (!flag_present) {
auto detail = PostEvaluation(key, context, default_value,
EvaluationReason::ErrorKind::kFlagNotFound,
event_scope, std::nullopt);
// Execute afterEvaluation hooks
if (executor) {
hooks::EvaluationSeriesContext series_context(
key, context, default_value, method_name, hook_context, std::nullopt);
executor->AfterEvaluation(series_context, detail);
}
return detail;
}
EvaluationDetail<Value> result =
evaluator_.Evaluate(*flag_rule->item, context, event_scope);
auto detail = PostEvaluation(key, context, default_value, result,
event_scope, flag_rule.get()->item);
// Execute afterEvaluation hooks
if (executor) {
hooks::EvaluationSeriesContext series_context(
key, context, default_value, method_name, hook_context, std::nullopt);
executor->AfterEvaluation(series_context, detail);
}
return detail;
}
std::optional<enum EvaluationReason::ErrorKind> ClientImpl::PreEvaluationChecks(
Context const& context) const {
if (!Initialized()) {
if (data_system_->CanEvaluateWhenNotInitialized()) {
LD_LOG(logger_, LogLevel::kWarn)
<< "Evaluation called before LaunchDarkly client "
"initialization completed; using last known values "
"from data store. The $inited key was not found in "
"the store; typically a Relay Proxy or other SDK "
"should set this key.";
} else {
return EvaluationReason::ErrorKind::kClientNotReady;
}
}
if (!context.Valid()) {
return EvaluationReason::ErrorKind::kUserNotSpecified;
}
return std::nullopt;
}
EvaluationDetail<Value> ClientImpl::PostEvaluation(
std::string const& key,
Context const& context,
Value const& default_value,
std::variant<enum EvaluationReason::ErrorKind, EvaluationDetail<Value>>
error_or_detail,
EventScope const& event_scope,
std::optional<data_model::Flag> const& flag) {
return std::visit(
[&](auto&& arg) {
using T = std::decay_t<decltype(arg)>;
// VARIANT: ErrorKind
if constexpr (std::is_same_v<T, enum EvaluationReason::ErrorKind>) {
auto detail = EvaluationDetail<Value>{arg, default_value};
event_scope.Send([&](EventFactory const& factory) {
return factory.UnknownFlag(key, context, detail,
default_value);
});
return detail;
}
// VARIANT: EvaluationDetail
else if constexpr (std::is_same_v<T, EvaluationDetail<Value>>) {
auto detail = EvaluationDetail<Value>{
(!arg.VariationIndex() ? default_value : arg.Value()),
arg.VariationIndex(), arg.Reason()};
event_scope.Send([&](EventFactory const& factory) {
return factory.Eval(key, context, flag, detail,
default_value, std::nullopt);
});
return detail;
}
},
std::move(error_or_detail));
}
bool IsFlagPresent(
std::shared_ptr<data_model::FlagDescriptor> const& flag_desc) {
return flag_desc && flag_desc->item;
}
EvaluationDetail<bool> ClientImpl::BoolVariationDetail(
Context const& ctx,
IClient::FlagKey const& key,
bool default_value) {
static hooks::HookContext empty_hook_context;
return VariationDetail<bool>(ctx, Value::Type::kBool, key, default_value,
empty_hook_context, kMethodBoolVariationDetail);
}
EvaluationDetail<bool> ClientImpl::BoolVariationDetail(
Context const& ctx,
IClient::FlagKey const& key,
bool default_value,
hooks::HookContext const& hook_context) {
return VariationDetail<bool>(ctx, Value::Type::kBool, key, default_value,
hook_context, kMethodBoolVariationDetail);
}
bool ClientImpl::BoolVariation(Context const& ctx,
IClient::FlagKey const& key,
bool default_value) {
static hooks::HookContext empty_hook_context;
return Variation(ctx, Value::Type::kBool, key, default_value,
empty_hook_context, kMethodBoolVariation);
}
bool ClientImpl::BoolVariation(Context const& ctx,
IClient::FlagKey const& key,
bool default_value,
hooks::HookContext const& hook_context) {
return Variation(ctx, Value::Type::kBool, key, default_value,
hook_context, kMethodBoolVariation);
}
EvaluationDetail<std::string> ClientImpl::StringVariationDetail(
Context const& ctx,
ClientImpl::FlagKey const& key,
std::string default_value) {
static hooks::HookContext empty_hook_context;
return VariationDetail<std::string>(ctx, Value::Type::kString, key,
default_value, empty_hook_context,
kMethodStringVariationDetail);
}
EvaluationDetail<std::string> ClientImpl::StringVariationDetail(
Context const& ctx,
ClientImpl::FlagKey const& key,
std::string default_value,
hooks::HookContext const& hook_context) {
return VariationDetail<std::string>(ctx, Value::Type::kString, key,
default_value, hook_context,
kMethodStringVariationDetail);
}
std::string ClientImpl::StringVariation(Context const& ctx,
IClient::FlagKey const& key,
std::string default_value) {
static hooks::HookContext empty_hook_context;
return Variation(ctx, Value::Type::kString, key, default_value,
empty_hook_context, kMethodStringVariation);
}
std::string ClientImpl::StringVariation(Context const& ctx,
IClient::FlagKey const& key,
std::string default_value,
hooks::HookContext const& hook_context) {
return Variation(ctx, Value::Type::kString, key, default_value,
hook_context, kMethodStringVariation);
}
EvaluationDetail<double> ClientImpl::DoubleVariationDetail(
Context const& ctx,
ClientImpl::FlagKey const& key,
double default_value) {
static hooks::HookContext empty_hook_context;
return VariationDetail<double>(ctx, Value::Type::kNumber, key,
default_value, empty_hook_context,
kMethodDoubleVariationDetail);
}
EvaluationDetail<double> ClientImpl::DoubleVariationDetail(
Context const& ctx,
ClientImpl::FlagKey const& key,
double default_value,
hooks::HookContext const& hook_context) {
return VariationDetail<double>(ctx, Value::Type::kNumber, key,
default_value, hook_context,
kMethodDoubleVariationDetail);
}
double ClientImpl::DoubleVariation(Context const& ctx,
IClient::FlagKey const& key,
double default_value) {
static hooks::HookContext empty_hook_context;
return Variation(ctx, Value::Type::kNumber, key, default_value,
empty_hook_context, kMethodDoubleVariation);
}
double ClientImpl::DoubleVariation(Context const& ctx,
IClient::FlagKey const& key,
double default_value,
hooks::HookContext const& hook_context) {
return Variation(ctx, Value::Type::kNumber, key, default_value,
hook_context, kMethodDoubleVariation);
}
EvaluationDetail<int> ClientImpl::IntVariationDetail(
Context const& ctx,
IClient::FlagKey const& key,
int default_value) {
static hooks::HookContext empty_hook_context;
return VariationDetail<int>(ctx, Value::Type::kNumber, key, default_value,
empty_hook_context, kMethodIntVariationDetail);
}
EvaluationDetail<int> ClientImpl::IntVariationDetail(
Context const& ctx,
IClient::FlagKey const& key,
int default_value,
hooks::HookContext const& hook_context) {
return VariationDetail<int>(ctx, Value::Type::kNumber, key, default_value,
hook_context, kMethodIntVariationDetail);
}
int ClientImpl::IntVariation(Context const& ctx,
IClient::FlagKey const& key,
int default_value) {
static hooks::HookContext empty_hook_context;
return Variation(ctx, Value::Type::kNumber, key, default_value,
empty_hook_context, kMethodIntVariation);
}
int ClientImpl::IntVariation(Context const& ctx,
IClient::FlagKey const& key,
int default_value,
hooks::HookContext const& hook_context) {
return Variation(ctx, Value::Type::kNumber, key, default_value,
hook_context, kMethodIntVariation);
}
EvaluationDetail<Value> ClientImpl::JsonVariationDetail(
Context const& ctx,
IClient::FlagKey const& key,
Value default_value) {
static hooks::HookContext empty_hook_context;
return VariationInternal(ctx, key, default_value, events_with_reasons_,
empty_hook_context, kMethodJsonVariationDetail);
}
EvaluationDetail<Value> ClientImpl::JsonVariationDetail(
Context const& ctx,
IClient::FlagKey const& key,
Value default_value,
hooks::HookContext const& hook_context) {
return VariationInternal(ctx, key, default_value, events_with_reasons_,
hook_context, kMethodJsonVariationDetail);
}
Value ClientImpl::JsonVariation(Context const& ctx,
IClient::FlagKey const& key,
Value default_value) {
static hooks::HookContext empty_hook_context;
return *VariationInternal(ctx, key, default_value, events_default_,
empty_hook_context, kMethodJsonVariation);
}
Value ClientImpl::JsonVariation(Context const& ctx,
IClient::FlagKey const& key,
Value default_value,
hooks::HookContext const& hook_context) {
return *VariationInternal(ctx, key, default_value, events_default_,
hook_context, kMethodJsonVariation);
}
IDataSourceStatusProvider& ClientImpl::DataSourceStatus() {
return status_manager_;
}
ClientImpl::~ClientImpl() {
ioc_.stop();
// TODO(SC-219101)
run_thread_.join();
}
} // namespace launchdarkly::server_side