refactor(cluster): Move CLUSTER commands to their own methods. (#1230)

* Migrate cluster related commands to cluster_family

* Move MutexGuardedObject to its own file.

* Re-add mistakenly removed test

* Remove very cool and useful MutexGuardedObject :)

* clang-format
This commit is contained in:
Chaka 2023-05-18 14:38:57 +03:00 committed by GitHub
parent 7e3a8c8b96
commit 378a0907b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 375 additions and 239 deletions

View file

@ -7,6 +7,7 @@
#include "base/varz_value.h"
#include "core/interpreter.h"
#include "facade/service_interface.h"
#include "server/cluster/cluster_family.h"
#include "server/command_registry.h"
#include "server/engine_shard_set.h"
#include "server/server_family.h"
@ -139,6 +140,7 @@ class Service : public facade::ServiceInterface {
util::ProactorPool& pp_;
ServerFamily server_family_;
ClusterFamily cluster_family_;
CommandRegistry registry_;
absl::flat_hash_map<std::string, unsigned> unknown_cmds_;