C++ Server-Side SDK
LaunchDarkly SDK
data_system_builder.hpp
1 #pragma once
2 
3 #include <launchdarkly/server_side/config/builders/data_system/background_sync_builder.hpp>
4 #include <launchdarkly/server_side/config/builders/data_system/lazy_load_builder.hpp>
5 #include <launchdarkly/server_side/config/built/data_system/data_system_config.hpp>
6 
7 #include <launchdarkly/error.hpp>
8 
9 namespace launchdarkly::server_side::config::builders {
10 
12  public:
15  using LazyLoad = LazyLoadBuilder;
16 
22 
29  DataSystemBuilder& Enabled(bool enabled);
30 
39 
47  DataSystemBuilder& Method(LazyLoad lazy_load);
48 
49  [[nodiscard]] tl::expected<built::DataSystemConfig, Error> Build() const;
50 
51  private:
52  std::optional<std::variant<BackgroundSync, LazyLoad>> method_builder_;
54 };
55 
56 } // namespace launchdarkly::server_side::config::builders
DataSystemBuilder & Enabled(bool enabled)
Specifies if the data system is enabled or disabled. If disabled, the configured method won't be used...
Definition: data_system_builder.cpp:19
DataSystemBuilder & Method(BackgroundSync bg_sync)
Configures the Background Sync data system. In this system, the SDK periodically receives updates fro...
Definition: data_system_builder.cpp:9
DataSystemBuilder & Disable()
Alias for Enabled(false).
Definition: data_system_builder.cpp:24
LazyLoadBuilder allows for specifying the configuration of the Lazy Load data system,...
Definition: lazy_load_builder.hpp:27