C++ Server-Side SDK
LaunchDarkly SDK
config.hpp
1 #pragma once
2 
3 #include <launchdarkly/config/shared/builders/endpoints_builder.hpp>
4 #include <launchdarkly/config/shared/builders/events_builder.hpp>
5 #include <launchdarkly/config/shared/built/data_source_config.hpp>
6 #include <launchdarkly/config/shared/built/events.hpp>
7 #include <launchdarkly/config/shared/built/http_properties.hpp>
8 #include <launchdarkly/config/shared/built/logging.hpp>
9 #include <launchdarkly/config/shared/built/persistence.hpp>
10 #include <launchdarkly/config/shared/built/service_endpoints.hpp>
11 
12 namespace launchdarkly::config {
13 
19 template <typename SDK>
20 struct Config {
21  public:
22  Config(std::string sdk_key,
23  bool offline,
24  shared::built::Logging logging,
26  shared::built::Events events,
27  std::optional<std::string> application_tag,
28  shared::built::DataSourceConfig<SDK> data_source_config,
29  shared::built::HttpProperties http_properties,
31 
32  [[nodiscard]] std::string const& SdkKey() const;
33 
34  [[nodiscard]] shared::built::ServiceEndpoints const& ServiceEndpoints()
35  const;
36 
37  [[nodiscard]] shared::built::Events const& Events() const;
38 
39  [[nodiscard]] std::optional<std::string> const& ApplicationTag() const;
40 
41  config::shared::built::DataSourceConfig<SDK> const& DataSourceConfig()
42  const;
43 
44  [[nodiscard]] shared::built::HttpProperties const& HttpProperties() const;
45 
46  [[nodiscard]] bool Offline() const;
47 
48  [[nodiscard]] shared::built::Logging const& Logging() const;
49 
50  [[nodiscard]] shared::built::Persistence<SDK> const& Persistence() const;
51 
52  private:
53  std::string sdk_key_;
54  bool offline_;
56  config::shared::built::ServiceEndpoints service_endpoints_;
57  std::optional<std::string> application_tag_;
62 };
63 
64 } // namespace launchdarkly::config
Definition: http_properties.hpp:26
Definition: service_endpoints.hpp:11
Definition: config.hpp:20
Definition: data_source_config.hpp:55