Skip to content

Commit

Permalink
impr:add with_auto_sign_in for QuicClientBuilder and TcpClientBuilder (
Browse files Browse the repository at this point in the history
  • Loading branch information
piaoger authored Jan 25, 2025
1 parent 0188865 commit 7d23bd2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iggy"
version = "0.6.81"
version = "0.6.82"
description = "Iggy is the persistent message streaming platform written in Rust, supporting QUIC, TCP and HTTP transport protocols, capable of processing millions of messages per second."
edition = "2021"
license = "Apache-2.0"
Expand Down
14 changes: 13 additions & 1 deletion sdk/src/clients/builder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::client::Client;
use crate::client::{AutoLogin, Client};
use crate::clients::client::IggyClient;
use crate::error::IggyError;
use crate::http::client::HttpClient;
Expand Down Expand Up @@ -111,6 +111,12 @@ impl TcpClientBuilder {
self
}

/// Sets the auto sign in during connection.
pub fn with_auto_sign_in(mut self, auto_sign_in: AutoLogin) -> Self {
self.config = self.config.with_auto_sign_in(auto_sign_in);
self
}

/// Sets the number of max retries when connecting to the server.
pub fn with_reconnection_max_retries(mut self, reconnection_retries: Option<u32>) -> Self {
self.config = self
Expand Down Expand Up @@ -165,6 +171,12 @@ impl QuicClientBuilder {
self
}

/// Sets the auto sign in during connection.
pub fn with_auto_sign_in(mut self, auto_sign_in: AutoLogin) -> Self {
self.config = self.config.with_auto_sign_in(auto_sign_in);
self
}

/// Sets the number of retries when connecting to the server.
pub fn with_reconnection_max_retries(mut self, reconnection_retries: Option<u32>) -> Self {
self.config = self
Expand Down

0 comments on commit 7d23bd2

Please sign in to comment.