Skip to content
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

Emulate legacy sse apis optional #295

Merged
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
4 changes: 3 additions & 1 deletion event_sidecar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ pub async fn run(
outbound_sse_data_receiver,
config
.emulate_legacy_sse_apis
.contains(&LegacySseApiTag::V1),
.as_ref()
.map(|v| v.contains(&LegacySseApiTag::V1))
.unwrap_or(false),
);
info!(address = %config.event_stream_server.port, "started {} server", "SSE");
tokio::try_join!(
Expand Down
4 changes: 2 additions & 2 deletions event_sidecar/src/types/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub enum LegacySseApiTag {
#[derive(Clone, Debug, Deserialize, PartialEq, Eq)]
pub struct SseEventServerConfig {
pub enable_server: bool,
pub emulate_legacy_sse_apis: Vec<LegacySseApiTag>,
pub emulate_legacy_sse_apis: Option<Vec<LegacySseApiTag>>,
pub inbound_channel_size: Option<usize>,
pub outbound_channel_size: Option<usize>,
pub connections: Vec<Connection>,
Expand All @@ -44,7 +44,7 @@ impl Default for SseEventServerConfig {
fn default() -> Self {
Self {
enable_server: true,
emulate_legacy_sse_apis: vec![LegacySseApiTag::V1],
emulate_legacy_sse_apis: Some(vec![LegacySseApiTag::V1]),
inbound_channel_size: Some(100),
outbound_channel_size: Some(100),
connections: vec![],
Expand Down
Loading