pub struct BatataClientBuilder { /* private fields */ }Expand description
Builder for BatataClient
Implementations§
Source§impl BatataClientBuilder
impl BatataClientBuilder
Sourcepub fn server_addr(self, addr: &str) -> Self
pub fn server_addr(self, addr: &str) -> Self
Set server address (single server)
Sourcepub fn server_addrs(self, addrs: Vec<String>) -> Self
pub fn server_addrs(self, addrs: Vec<String>) -> Self
Set server addresses (multiple servers)
Sourcepub fn timeout_ms(self, timeout_ms: u64) -> Self
pub fn timeout_ms(self, timeout_ms: u64) -> Self
Set timeout in milliseconds
Sourcepub fn retry_times(self, retry_times: u32) -> Self
pub fn retry_times(self, retry_times: u32) -> Self
Set retry times
Sourcepub fn username_password(self, username: &str, password: &str) -> Self
pub fn username_password(self, username: &str, password: &str) -> Self
Set username and password for authentication
Sourcepub fn access_key(self, access_key: &str, secret_key: &str) -> Self
pub fn access_key(self, access_key: &str, secret_key: &str) -> Self
Set access key and secret key for authentication
Sourcepub fn credentials(self, credentials: Credentials) -> Self
pub fn credentials(self, credentials: Credentials) -> Self
Set credentials
Sourcepub fn acm(
self,
access_key: &str,
secret_key: &str,
endpoint: &str,
region_id: &str,
) -> Self
pub fn acm( self, access_key: &str, secret_key: &str, endpoint: &str, region_id: &str, ) -> Self
Configure for Alibaba Cloud ACM
Sourcepub fn acm_endpoint(self, endpoint: &str) -> Self
pub fn acm_endpoint(self, endpoint: &str) -> Self
Set ACM endpoint
Sourcepub fn acm_region_id(self, region_id: &str) -> Self
pub fn acm_region_id(self, region_id: &str) -> Self
Set ACM region ID
Sourcepub fn tls_config(self, tls: TlsConfig) -> Self
pub fn tls_config(self, tls: TlsConfig) -> Self
Set TLS configuration
Sourcepub fn cache_config(self, cache: CacheConfig) -> Self
pub fn cache_config(self, cache: CacheConfig) -> Self
Set cache configuration
Sourcepub fn not_load_cache_at_start(self, enabled: bool) -> Self
pub fn not_load_cache_at_start(self, enabled: bool) -> Self
Set not load cache at startup
Sourcepub fn update_cache_when_empty(self, enabled: bool) -> Self
pub fn update_cache_when_empty(self, enabled: bool) -> Self
Set update cache when empty (failover mode)
Sourcepub fn failover_enabled(self, enabled: bool) -> Self
pub fn failover_enabled(self, enabled: bool) -> Self
Enable/disable failover cache
Sourcepub async fn build(self) -> Result<BatataClient>
pub async fn build(self) -> Result<BatataClient>
Build the client
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatataClientBuilder
impl RefUnwindSafe for BatataClientBuilder
impl Send for BatataClientBuilder
impl Sync for BatataClientBuilder
impl Unpin for BatataClientBuilder
impl UnwindSafe for BatataClientBuilder
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request