[−][src]Struct reool::config::Builder
A builder for a MultiNodePool
Methods
impl<I> Builder<I>
[src]
pub fn desired_pool_size(self, v: usize) -> Self
[src]
The number of connections the pool should initially have and try to maintain
pub fn checkout_timeout(self, v: Option<Duration>) -> Self
[src]
The timeout for a checkout if no specific timeout is given with a checkout.
pub fn backoff_strategy(self, v: BackoffStrategy) -> Self
[src]
The BackoffStrategy
to use when retrying on
failures to create new connections
pub fn reservation_limit(self, v: Option<usize>) -> Self
[src]
The maximum length of the queue for waiting checkouts when no idle connections are available
pub fn stats_interval(self, v: Duration) -> Self
[src]
The interval in which the pool will send statistics to the instrumentation
pub fn activation_order(self, v: ActivationOrder) -> Self
[src]
pub fn min_required_nodes(self, v: usize) -> Self
[src]
The minimum required nodes to start
pub fn connect_to_nodes(self, v: Vec<String>) -> Self
[src]
The Redis nodes to connect to
pub fn connect_to_node<T: Into<String>>(self, v: T) -> Self
[src]
The Redis node to connect to
pub fn node_pool_strategy(self, v: NodePoolStrategy) -> Self
[src]
Sets the NodePoolStrategy
to be used when creating the pool.
pub fn task_executor(self, executor: TaskExecutor) -> Self
[src]
The executor to use for spawning tasks. If not set it is assumed that the pool is created on the default runtime.
pub fn instrumented<II>(self, instrumentation: II) -> Builder<II> where
II: Instrumentation + Send + Sync + 'static,
[src]
II: Instrumentation + Send + Sync + 'static,
Adds instrumentation to the pool
pub fn update_from_environment(
&mut self,
prefix: Option<&str>
) -> Result<(), InitializationError>
[src]
&mut self,
prefix: Option<&str>
) -> Result<(), InitializationError>
Sets values in this builder from the environment.
If no prefix
is set all the given env key start with REOOL_
.
Otherwise the prefix is used with an automatically appended _
.
DESIRED_POOL_SIZE
:usize
. Omit if you do not want to update the valueCHECKOUT_TIMEOUT_MS
:u64
or"NONE"
. Omit if you do not want to update the valueRESERVATION_LIMIT
:usize
or"NONE"
. Omit if you do not want to update the valueSTATS_INTERVAL_MS
:u64
. Omit if you do not want to update the valueACTIVATION_ORDER
:string
. Omit if you do not want to update the valueMIN_REQUIRED_NODES
:usize
. Omit if you do not want to update the valueCONNECT_TO
:[String]
. Separated by;
. Omit if you do not want to update the valueNODE_POOL_STRATEGY
: ` Omit if you do not want to update the value
pub fn updated_from_environment(
self,
prefix: Option<&str>
) -> Result<Self, InitializationError>
[src]
self,
prefix: Option<&str>
) -> Result<Self, InitializationError>
Updates this builder from the environment and returns Self
.
If no prefix
is set all the given env key start with REOOL_
.
Otherwise the prefix is used with an automatically appended _
.
DESIRED_POOL_SIZE
:usize
. Omit if you do not want to update the valueCHECKOUT_TIMEOUT_MS
:u64
or"NONE"
. Omit if you do not want to update the valueRESERVATION_LIMIT
:usize
or"NONE"
. Omit if you do not want to update the valueSTATS_INTERVAL_MS
:u64
. Omit if you do not want to update the valueACTIVATION_ORDER
:string
. Omit if you do not want to update the valueMIN_REQUIRED_NODES
:usize
. Omit if you do not want to update the valueCONNECT_TO
:[String]
. Separated by;
. Omit if you do not want to update the valueNODE_POOL_STRATEGY
: ` Omit if you do not want to update the value
impl<I> Builder<I> where
I: Instrumentation + Send + Sync + 'static,
[src]
I: Instrumentation + Send + Sync + 'static,
pub fn finish_redis_rs(self) -> Result<RedisPool, InitializationError>
[src]
Build a new RedisPool
Trait Implementations
Auto Trait Implementations
impl<I> Send for Builder<I> where
I: Send,
I: Send,
impl<I> Sync for Builder<I> where
I: Sync,
I: Sync,
impl<I> Unpin for Builder<I> where
I: Unpin,
I: Unpin,
impl<I> !UnwindSafe for Builder<I>
impl<I> !RefUnwindSafe for Builder<I>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,