Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apache/kvrocks-controller
/ IsLeader
Method
IsLeader
store/store.go:324–326 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
322
}
323
324
func
(s *ClusterStore) IsLeader() bool {
325
return
s.e.Leader() == s.e.ID()
326
}
327
328
func
(s *ClusterStore) Leader() string {
329
return
s.e.Leader()
Callers
4
TestController_Basics
Function · 0.95
syncLoop
Method · 0.80
leaderEventLoop
Method · 0.80
RedirectIfNotLeader
Function · 0.80
Calls
2
Leader
Method · 0.65
ID
Method · 0.65
Tested by
1
TestController_Basics
Function · 0.76