Skip to content

chore: update server-side polling/streaming defaults #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct StreamingConfig<ClientSDK> {
template <>
struct StreamingConfig<ServerSDK> {
std::chrono::milliseconds initial_reconnect_delay;
std::string streaming_path;
};

template <typename SDK>
Expand All @@ -38,6 +39,8 @@ struct PollingConfig<ClientSDK> {
template <>
struct PollingConfig<ServerSDK> {
std::chrono::seconds poll_interval;
std::string polling_get_path;
std::chrono::seconds min_polling_interval;
};

template <typename SDK>
Expand Down
7 changes: 4 additions & 3 deletions libs/common/include/launchdarkly/config/shared/defaults.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ struct Defaults<ServerSDK> {
}

static auto HttpProperties() -> shared::built::HttpProperties {
return {std::chrono::seconds{2}, std::chrono::seconds{10},
return {std::chrono::seconds{10}, std::chrono::seconds{10},
std::chrono::seconds{10}, std::chrono::seconds{10},
std::map<std::string, std::string>()};
}

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

static auto DataSourceConfig()
Expand All @@ -107,7 +107,8 @@ struct Defaults<ServerSDK> {
}

static auto PollingConfig() -> shared::built::PollingConfig<ServerSDK> {
return {std::chrono::seconds{30}};
return {std::chrono::seconds{30}, "/sdk/latest-all",
std::chrono::seconds{30}};
}
};

Expand Down