pub struct CreateDatabaseRequest {Show 14 fields
pub name: String,
pub memory_size: Option<u64>,
pub port: Option<u16>,
pub replication: Option<bool>,
pub persistence: Option<String>,
pub eviction_policy: Option<String>,
pub sharding: Option<bool>,
pub shards_count: Option<u32>,
pub shard_count: Option<u32>,
pub proxy_policy: Option<String>,
pub rack_aware: Option<bool>,
pub module_list: Option<Vec<ModuleConfig>>,
pub crdt: Option<bool>,
pub authentication_redis_pass: Option<String>,
}Expand description
Create database request
§Examples
use redis_enterprise::{CreateDatabaseRequest, ModuleConfig};
let request = CreateDatabaseRequest::builder()
.name("my-database")
.memory_size(1024 * 1024 * 1024) // 1GB
.port(12000)
.replication(true)
.persistence("aof")
.eviction_policy("volatile-lru")
.shards_count(2)
.authentication_redis_pass("secure-password")
.build();Fields§
§name: StringDatabase name.
memory_size: Option<u64>Database memory limit in bytes (0 for unlimited).
port: Option<u16>TCP port on which the database is available (read-only).
replication: Option<bool>Whether in-memory replication is enabled.
persistence: Option<String>Persistence policy (e.g. "disabled", "aof", "snapshot").
eviction_policy: Option<String>Eviction policy when the database reaches its memory limit (e.g. "allkeys-lru").
sharding: Option<bool>Whether the database is sharded.
shards_count: Option<u32>Number of database shards.
shard_count: Option<u32>Shard count.
proxy_policy: Option<String>Proxy policy (e.g. "single", "all-master-shards", "all-nodes").
rack_aware: Option<bool>Whether rack-aware shard placement is enabled.
module_list: Option<Vec<ModuleConfig>>List of Redis modules loaded into the database.
crdt: Option<bool>Whether this database participates in a CRDT (Active-Active) deployment.
authentication_redis_pass: Option<String>Redis password used for client authentication.
Implementations§
Source§impl CreateDatabaseRequest
impl CreateDatabaseRequest
Sourcepub fn builder() -> CreateDatabaseRequestBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> CreateDatabaseRequestBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building CreateDatabaseRequest.
On the builder, call .name(...), .memory_size(...)(optional), .port(...)(optional), .replication(...)(optional), .persistence(...)(optional), .eviction_policy(...)(optional), .sharding(...)(optional), .shards_count(...)(optional), .shard_count(...)(optional), .proxy_policy(...)(optional), .rack_aware(...)(optional), .module_list(...)(optional), .crdt(...)(optional), .authentication_redis_pass(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of CreateDatabaseRequest.