MCPcopy 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
324func (s *ClusterStore) IsLeader() bool {
325 return s.e.Leader() == s.e.ID()
326}
327
328func (s *ClusterStore) Leader() string {
329 return s.e.Leader()

Callers 4

TestController_BasicsFunction · 0.95
syncLoopMethod · 0.80
leaderEventLoopMethod · 0.80
RedirectIfNotLeaderFunction · 0.80

Calls 2

LeaderMethod · 0.65
IDMethod · 0.65

Tested by 1

TestController_BasicsFunction · 0.76