// ============ 服务器管理命令 ============
///|
pub async fn Client::bgrewriteaof(self : Client) -> RedisValue {
self.send(["BGREWRITEAOF"])
}
///|
pub async fn Client::bgsave(self : Client) -> RedisValue {
self.send(["BGSAVE"])
}
///|
pub async fn Client::command(self : Client) -> RedisValue {
self.send(["COMMAND"])
}
///|
pub async fn Client::command_count(self : Client) -> RedisValue {
self.send(["COMMAND", "COUNT"])
}
///|
pub async fn Client::command_docs(
self : Client,
command_names : Array[String],
) -> RedisValue {
let args = ["COMMAND", "DOCS", ..command_names]
self.send(args)
}
///|
pub async fn Client::command_getkeys(
self : Client,
command : Array[String],
) -> RedisValue {
let args = ["COMMAND", "GETKEYS", ..command]
self.send(args)
}
///|
pub async fn Client::command_getkeysandflags(
self : Client,
command : Array[String],
) -> RedisValue {
let args = ["COMMAND", "GETKEYSANDFLAGS", ..command]
self.send(args)
}
///|
pub async fn Client::command_info(
self : Client,
command_names : Array[String],
) -> RedisValue {
let args = ["COMMAND", "INFO", ..command_names]
self.send(args)
}
///|
pub async fn Client::command_list(self : Client) -> RedisValue {
self.send(["COMMAND", "LIST"])
}
///|
pub async fn Client::config_get(
self : Client,
parameter : String,
) -> RedisValue {
self.send(["CONFIG", "GET", parameter])
}
///|
pub async fn Client::config_resetstat(self : Client) -> RedisValue {
self.send(["CONFIG", "RESETSTAT"])
}
///|
pub async fn Client::config_rewrite(self : Client) -> RedisValue {
self.send(["CONFIG", "REWRITE"])
}
///|
pub async fn Client::config_set(
self : Client,
parameter : String,
value : String,
) -> RedisValue {
self.send(["CONFIG", "SET", parameter, value])
}
///|
pub async fn Client::debug_object(
self : Client,
key : String,
) -> RedisValue {
self.send(["DEBUG", "OBJECT", key])
}
///|
pub async fn Client::debug_segfault(self : Client) -> RedisValue {
self.send(["DEBUG", "SEGFAULT"])
}
///|
pub async fn Client::info(self : Client) -> RedisValue {
self.send(["INFO"])
}
///|
pub async fn Client::info_section(
self : Client,
section : String,
) -> RedisValue {
self.send(["INFO", section])
}
///|
pub async fn Client::lastsave(self : Client) -> RedisValue {
self.send(["LASTSAVE"])
}
///|
pub async fn Client::latency_doctor(self : Client) -> RedisValue {
self.send(["LATENCY", "DOCTOR"])
}
///|
pub async fn Client::latency_graph(
self : Client,
event : String,
) -> RedisValue {
self.send(["LATENCY", "GRAPH", event])
}
///|
pub async fn Client::latency_history(
self : Client,
event : String,
) -> RedisValue {
self.send(["LATENCY", "HISTORY", event])
}
///|
pub async fn Client::latency_latest(self : Client) -> RedisValue {
self.send(["LATENCY", "LATEST"])
}
///|
pub async fn Client::latency_reset(
self : Client,
events : Array[String],
) -> RedisValue {
let args = ["LATENCY", "RESET", ..events]
self.send(args)
}
///|
pub async fn Client::memory_doctor(self : Client) -> RedisValue {
self.send(["MEMORY", "DOCTOR"])
}
///|
pub async fn Client::memory_malloc_stats(self : Client) -> RedisValue {
self.send(["MEMORY", "MALLOC-STATS"])
}
///|
pub async fn Client::memory_purge(self : Client) -> RedisValue {
self.send(["MEMORY", "PURGE"])
}
///|
pub async fn Client::memory_stats(self : Client) -> RedisValue {
self.send(["MEMORY", "STATS"])
}
///|
pub async fn Client::memory_usage(
self : Client,
key : String,
) -> RedisValue {
self.send(["MEMORY", "USAGE", key])
}
///|
pub async fn Client::module_list(self : Client) -> RedisValue {
self.send(["MODULE", "LIST"])
}
///|
pub async fn Client::module_load(
self : Client,
path : String,
) -> RedisValue {
self.send(["MODULE", "LOAD", path])
}
///|
pub async fn Client::module_loadex(
self : Client,
path : String,
args : Array[String],
) -> RedisValue {
let command_args = ["MODULE", "LOADEX", path, ..args]
self.send(command_args)
}
///|
pub async fn Client::module_unload(
self : Client,
name : String,
) -> RedisValue {
self.send(["MODULE", "UNLOAD", name])
}
///|
pub async fn Client::monitor(self : Client) -> RedisValue {
self.send(["MONITOR"])
}
///|
pub async fn Client::psync(
self : Client,
replicationid : String,
offset : String,
) -> RedisValue {
self.send(["PSYNC", replicationid, offset])
}
///|
pub async fn Client::replconf(
self : Client,
option : String,
value : String,
) -> RedisValue {
self.send(["REPLCONF", option, value])
}
///|
pub async fn Client::replicaof(
self : Client,
host : String,
port : String,
) -> RedisValue {
self.send(["REPLICAOF", host, port])
}
///|
pub async fn Client::role(self : Client) -> RedisValue {
self.send(["ROLE"])
}
///|
pub async fn Client::save(self : Client) -> RedisValue {
self.send(["SAVE"])
}
///|
pub async fn Client::shutdown(self : Client) -> RedisValue {
self.send(["SHUTDOWN"])
}
///|
pub async fn Client::slaveof(
self : Client,
host : String,
port : String,
) -> RedisValue {
self.send(["SLAVEOF", host, port])
}
///|
pub async fn Client::slowlog_get(self : Client) -> RedisValue {
self.send(["SLOWLOG", "GET"])
}
///|
pub async fn Client::slowlog_len(self : Client) -> RedisValue {
self.send(["SLOWLOG", "LEN"])
}
///|
pub async fn Client::slowlog_reset(self : Client) -> RedisValue {
self.send(["SLOWLOG", "RESET"])
}
///|
pub async fn Client::sync(self : Client) -> RedisValue {
self.send(["SYNC"])
}
///|
pub async fn Client::time(self : Client) -> RedisValue {
self.send(["TIME"])
}