Skip to content

Commit

Permalink
Display instance for TcpSocketConfig (#1332)
Browse files Browse the repository at this point in the history
Missed it in #1321
  • Loading branch information
BenFradet authored Nov 10, 2024
1 parent 90dccd2 commit 6aa4335
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration/tests/cli/system/test_snapshot_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub async fn should_be_successful() {
.unwrap();

let zip_path = snapshot_file.path();
let file = File::open(&zip_path).unwrap();
let file = File::open(zip_path).unwrap();
let mut archive = ZipArchive::new(file).unwrap();

let contents = {
Expand Down
16 changes: 13 additions & 3 deletions server/src/configs/displays.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::configs::{
CacheConfig, CompressionConfig, EncryptionConfig, LoggingConfig, PartitionConfig,
SegmentConfig, StreamConfig, SystemConfig, TopicConfig,
},
tcp::{TcpConfig, TcpTlsConfig},
tcp::{TcpConfig, TcpSocketConfig, TcpTlsConfig},
};
use std::fmt::{Display, Formatter};

Expand Down Expand Up @@ -290,8 +290,8 @@ impl Display for TcpConfig {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(
f,
"{{ enabled: {}, address: {}, tls: {} }}",
self.enabled, self.address, self.tls
"{{ enabled: {}, address: {}, ipv6: {}, tls: {}, socket: {} }}",
self.enabled, self.address, self.ipv6, self.tls, self.socket,
)
}
}
Expand All @@ -306,6 +306,16 @@ impl Display for TcpTlsConfig {
}
}

impl Display for TcpSocketConfig {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(
f,
"{{ override defaults: {}, recv buffer size: {}, send buffer size {}, keepalive: {}, nodelay: {}, linger: {} }}",
self.override_defaults, self.recv_buffer_size, self.send_buffer_size, self.keepalive, self.nodelay, self.linger,
)
}
}

impl Display for TelemetryConfig {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(
Expand Down

0 comments on commit 6aa4335

Please sign in to comment.