pub struct RedisServerConfig {Show 36 fields
pub port: u16,
pub bind: String,
pub protected_mode: bool,
pub tcp_backlog: Option<u32>,
pub unixsocket: Option<PathBuf>,
pub unixsocketperm: Option<u32>,
pub timeout: Option<u32>,
pub tcp_keepalive: Option<u32>,
pub tls_port: Option<u16>,
pub tls_cert_file: Option<PathBuf>,
pub tls_key_file: Option<PathBuf>,
pub tls_ca_cert_file: Option<PathBuf>,
pub tls_auth_clients: Option<bool>,
pub daemonize: bool,
pub dir: PathBuf,
pub loglevel: LogLevel,
pub databases: Option<u32>,
pub maxmemory: Option<String>,
pub maxmemory_policy: Option<String>,
pub maxclients: Option<u32>,
pub save: bool,
pub appendonly: bool,
pub replicaof: Option<(String, u16)>,
pub masterauth: Option<String>,
pub password: Option<String>,
pub acl_file: Option<PathBuf>,
pub cluster_enabled: bool,
pub cluster_node_timeout: Option<u64>,
pub loadmodule: Vec<PathBuf>,
pub hz: Option<u32>,
pub io_threads: Option<u32>,
pub io_threads_do_reads: Option<bool>,
pub notify_keyspace_events: Option<String>,
pub extra: HashMap<String, String>,
pub redis_server_bin: String,
pub redis_cli_bin: String,
}Expand description
Builder and lifecycle manager for a single redis-server process.
§Example
use redis_server_wrapper::RedisServer;
let server = RedisServer::new()
.port(6400)
.bind("127.0.0.1")
.save(false)
.start()
.await
.unwrap();
assert!(server.is_alive().await);
// Stopped automatically on Drop.Fields§
§port: u16§bind: String§protected_mode: bool§tcp_backlog: Option<u32>§unixsocket: Option<PathBuf>§unixsocketperm: Option<u32>§timeout: Option<u32>§tcp_keepalive: Option<u32>§tls_port: Option<u16>§tls_cert_file: Option<PathBuf>§tls_key_file: Option<PathBuf>§tls_ca_cert_file: Option<PathBuf>§tls_auth_clients: Option<bool>§daemonize: bool§dir: PathBuf§loglevel: LogLevel§databases: Option<u32>§maxmemory: Option<String>§maxmemory_policy: Option<String>§maxclients: Option<u32>§save: bool§appendonly: bool§replicaof: Option<(String, u16)>§masterauth: Option<String>§password: Option<String>§acl_file: Option<PathBuf>§cluster_enabled: bool§cluster_node_timeout: Option<u64>§loadmodule: Vec<PathBuf>§hz: Option<u32>§io_threads: Option<u32>§io_threads_do_reads: Option<bool>§notify_keyspace_events: Option<String>§extra: HashMap<String, String>§redis_server_bin: String§redis_cli_bin: StringTrait Implementations§
Source§impl Clone for RedisServerConfig
impl Clone for RedisServerConfig
Source§fn clone(&self) -> RedisServerConfig
fn clone(&self) -> RedisServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RedisServerConfig
impl Debug for RedisServerConfig
Auto Trait Implementations§
impl Freeze for RedisServerConfig
impl RefUnwindSafe for RedisServerConfig
impl Send for RedisServerConfig
impl Sync for RedisServerConfig
impl Unpin for RedisServerConfig
impl UnsafeUnpin for RedisServerConfig
impl UnwindSafe for RedisServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more