mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
feat(cluster): Implement CLUSTER INFO
. (#1258)
Implementation supports 3 cases: 1. Emulated mode (as was previously implemented) 2. Non-configured cluster mode 3. Configured cluster mode
This commit is contained in:
parent
74b33121de
commit
7289a83087
5 changed files with 125 additions and 18 deletions
|
@ -255,8 +255,12 @@ ClusterConfig::Node ClusterConfig::GetMasterNodeForSlot(SlotId id) const {
|
|||
|
||||
ClusterConfig::ClusterShards ClusterConfig::GetConfig() const {
|
||||
shared_lock gu(mu_);
|
||||
|
||||
return config_;
|
||||
}
|
||||
|
||||
bool ClusterConfig::IsConfigured() const {
|
||||
shared_lock gu(mu_);
|
||||
return !config_.empty();
|
||||
}
|
||||
|
||||
} // namespace dfly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue