chore: Split DispatchCommand into validation and main part (#1071)

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
Vladislav 2023-04-11 15:41:49 +03:00 committed by GitHub
parent d9c9d9fc72
commit 90a606851a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 114 additions and 84 deletions

View file

@ -114,6 +114,9 @@ class Service : public facade::ServiceInterface {
CmdArgList keys, args;
};
// Return false if command is invalid and reply with error.
bool VerifyCommand(const CommandId* cid, CmdArgList args, facade::ConnectionContext* cntx);
void EvalInternal(const EvalArgs& eval_args, Interpreter* interpreter, ConnectionContext* cntx);
void CallFromScript(CmdArgList args, ObjectExplorer* reply, ConnectionContext* cntx);