MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / KnownGroups

Method KnownGroups

dgraph/cmd/zero/zero.go:202–210  ·  view source on GitHub ↗

KnownGroups returns a list of the known groups.

()

Source from the content-addressed store, hash-verified

200
201// KnownGroups returns a list of the known groups.
202func (s *Server) KnownGroups() []uint32 {
203 var groups []uint32
204 s.RLock()
205 defer s.RUnlock()
206 for group := range s.state.Groups {
207 groups = append(groups, group)
208 }
209 return groups
210}
211
212func (s *Server) hasLeader(gid uint32) bool {
213 s.AssertRLock()

Callers 1

MoveTabletMethod · 0.95

Calls 2

RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by

no test coverage detected