aboutsummaryrefslogtreecommitdiff
path: root/src/resp_commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/resp_commands.rs')
-rw-r--r--src/resp_commands.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/resp_commands.rs b/src/resp_commands.rs
index 554c296..dcb717f 100644
--- a/src/resp_commands.rs
+++ b/src/resp_commands.rs
@@ -117,6 +117,7 @@ pub enum RedisCommands {
ConfigGet(String),
Keys(String),
Info(String),
+ ReplConf((String, String)),
Invalid,
}
@@ -251,6 +252,9 @@ impl RedisCommands {
.to_vec();
RT::BulkString(response).to_resp_bytes()
}
+ RC::ReplConf((_, _)) => {
+ resp_bytes!("OK")
+ }
RC::Invalid => todo!(),
}
}
@@ -432,6 +436,15 @@ impl From<RespType> for RedisCommands {
}
Self::Invalid
}
+ "REPLCONF" => {
+ let Some(op1) = args.next() else {
+ return Self::Invalid;
+ };
+ let Some(op2) = args.next() else {
+ return Self::Invalid;
+ };
+ Self::ReplConf((op1, op2))
+ }
_ => Self::Invalid,
}
}