Skip to content

Commit cde5f7f

Browse files
committed
network/connection: Added timestamp generator to ConnectionConfig
The timestamp generator in ConnectionConfig is set in Session::Connect()
1 parent f3fd0af commit cde5f7f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

scylla/src/client/session.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,7 @@ where
987987
compression: config.compression,
988988
tcp_nodelay: config.tcp_nodelay,
989989
tcp_keepalive_interval: config.tcp_keepalive_interval,
990+
timestamp_generator: config.timestamp_generator,
990991
#[cfg(feature = "ssl")]
991992
ssl_config: config.ssl_context.map(SslConfig::new_with_global_context),
992993
authenticator: config.authenticator.clone(),

scylla/src/network/connection.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use crate::frame::{
2222
FrameParams, SerializedRequest,
2323
};
2424
use crate::policies::address_translator::AddressTranslator;
25+
use crate::policies::timestamp_generator::TimestampGenerator;
2526
use crate::query::Query;
2627
use crate::response::query_result::QueryResult;
2728
use crate::response::{
@@ -324,6 +325,7 @@ pub(crate) struct ConnectionConfig {
324325
pub(crate) compression: Option<Compression>,
325326
pub(crate) tcp_nodelay: bool,
326327
pub(crate) tcp_keepalive_interval: Option<Duration>,
328+
pub(crate) timestamp_generator: Option<Arc<dyn TimestampGenerator>>,
327329
#[cfg(feature = "ssl")]
328330
pub(crate) ssl_config: Option<SslConfig>,
329331
pub(crate) connect_timeout: std::time::Duration,
@@ -349,6 +351,7 @@ impl Default for ConnectionConfig {
349351
compression: None,
350352
tcp_nodelay: true,
351353
tcp_keepalive_interval: None,
354+
timestamp_generator: None,
352355
event_sender: None,
353356
#[cfg(feature = "ssl")]
354357
ssl_config: None,

0 commit comments

Comments
 (0)