Skip to content

Commit

Permalink
transport/connection: Added timestamp generator to ConnectionConfig a…
Browse files Browse the repository at this point in the history
…nd setting it in Session::connect()
  • Loading branch information
smoczy123 committed Dec 4, 2024
1 parent 4fd7312 commit 0f151f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scylla/src/transport/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ use super::iterator::QueryPager;
use super::locator::tablets::{RawTablet, TabletParsingError};
use super::query_result::QueryResult;
use super::session::AddressTranslator;
use super::timestamp_generator::TimestampGenerator;
use super::topology::{PeerEndpoint, UntranslatedEndpoint, UntranslatedPeer};
use super::NodeAddr;
#[cfg(feature = "cloud")]
Expand Down Expand Up @@ -565,6 +566,7 @@ pub(crate) struct ConnectionConfig {
pub(crate) compression: Option<Compression>,
pub(crate) tcp_nodelay: bool,
pub(crate) tcp_keepalive_interval: Option<Duration>,
pub(crate) timestamp_generator: Option<Arc<dyn TimestampGenerator>>,
#[cfg(feature = "ssl")]
pub(crate) ssl_config: Option<SslConfig>,
pub(crate) connect_timeout: std::time::Duration,
Expand All @@ -590,6 +592,7 @@ impl Default for ConnectionConfig {
compression: None,
tcp_nodelay: true,
tcp_keepalive_interval: None,
timestamp_generator: None,
event_sender: None,
#[cfg(feature = "ssl")]
ssl_config: None,
Expand Down
1 change: 1 addition & 0 deletions scylla/src/transport/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ where
compression: config.compression,
tcp_nodelay: config.tcp_nodelay,
tcp_keepalive_interval: config.tcp_keepalive_interval,
timestamp_generator: config.timestamp_generator,
#[cfg(feature = "ssl")]
ssl_config: config.ssl_context.map(SslConfig::new_with_global_context),
authenticator: config.authenticator.clone(),
Expand Down

0 comments on commit 0f151f1

Please sign in to comment.