Skip to content

Commit 0f151f1

Browse files
committed
transport/connection: Added timestamp generator to ConnectionConfig and setting it in Session::connect()
1 parent 4fd7312 commit 0f151f1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

scylla/src/transport/connection.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ use super::iterator::QueryPager;
5151
use super::locator::tablets::{RawTablet, TabletParsingError};
5252
use super::query_result::QueryResult;
5353
use super::session::AddressTranslator;
54+
use super::timestamp_generator::TimestampGenerator;
5455
use super::topology::{PeerEndpoint, UntranslatedEndpoint, UntranslatedPeer};
5556
use super::NodeAddr;
5657
#[cfg(feature = "cloud")]
@@ -565,6 +566,7 @@ pub(crate) struct ConnectionConfig {
565566
pub(crate) compression: Option<Compression>,
566567
pub(crate) tcp_nodelay: bool,
567568
pub(crate) tcp_keepalive_interval: Option<Duration>,
569+
pub(crate) timestamp_generator: Option<Arc<dyn TimestampGenerator>>,
568570
#[cfg(feature = "ssl")]
569571
pub(crate) ssl_config: Option<SslConfig>,
570572
pub(crate) connect_timeout: std::time::Duration,
@@ -590,6 +592,7 @@ impl Default for ConnectionConfig {
590592
compression: None,
591593
tcp_nodelay: true,
592594
tcp_keepalive_interval: None,
595+
timestamp_generator: None,
593596
event_sender: None,
594597
#[cfg(feature = "ssl")]
595598
ssl_config: None,

scylla/src/transport/session.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ where
10801080
compression: config.compression,
10811081
tcp_nodelay: config.tcp_nodelay,
10821082
tcp_keepalive_interval: config.tcp_keepalive_interval,
1083+
timestamp_generator: config.timestamp_generator,
10831084
#[cfg(feature = "ssl")]
10841085
ssl_config: config.ssl_context.map(SslConfig::new_with_global_context),
10851086
authenticator: config.authenticator.clone(),

0 commit comments

Comments
 (0)