Skip to content

Commit 4800fee

Browse files
authored
chore: update server-side polling/streaming defaults (#148)
Adds / updates a couple of default config options in prep for server-side SDK.
1 parent 728f772 commit 4800fee

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

libs/common/include/launchdarkly/config/shared/built/data_source_config.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct StreamingConfig<ClientSDK> {
2222
template <>
2323
struct StreamingConfig<ServerSDK> {
2424
std::chrono::milliseconds initial_reconnect_delay;
25+
std::string streaming_path;
2526
};
2627

2728
template <typename SDK>
@@ -38,6 +39,8 @@ struct PollingConfig<ClientSDK> {
3839
template <>
3940
struct PollingConfig<ServerSDK> {
4041
std::chrono::seconds poll_interval;
42+
std::string polling_get_path;
43+
std::chrono::seconds min_polling_interval;
4144
};
4245

4346
template <typename SDK>

libs/common/include/launchdarkly/config/shared/defaults.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ struct Defaults<ServerSDK> {
9292
}
9393

9494
static auto HttpProperties() -> shared::built::HttpProperties {
95-
return {std::chrono::seconds{2}, std::chrono::seconds{10},
95+
return {std::chrono::seconds{10}, std::chrono::seconds{10},
9696
std::chrono::seconds{10}, std::chrono::seconds{10},
9797
std::map<std::string, std::string>()};
9898
}
9999

100100
static auto StreamingConfig() -> shared::built::StreamingConfig<ServerSDK> {
101-
return {std::chrono::seconds{1}};
101+
return {std::chrono::seconds{1}, "/all"};
102102
}
103103

104104
static auto DataSourceConfig()
@@ -107,7 +107,8 @@ struct Defaults<ServerSDK> {
107107
}
108108

109109
static auto PollingConfig() -> shared::built::PollingConfig<ServerSDK> {
110-
return {std::chrono::seconds{30}};
110+
return {std::chrono::seconds{30}, "/sdk/latest-all",
111+
std::chrono::seconds{30}};
111112
}
112113
};
113114

0 commit comments

Comments
 (0)