MCPcopy
hub / github.com/dgraph-io/dgraph / GetMembershipState

Function GetMembershipState

worker/groups.go:267–272  ·  view source on GitHub ↗

GetMembershipState returns the current membership state.

()

Source from the content-addressed store, hash-verified

265
266// GetMembershipState returns the current membership state.
267func GetMembershipState() *pb.MembershipState {
268 g := groups()
269 g.RLock()
270 defer g.RUnlock()
271 return proto.Clone(g.state).(*pb.MembershipState)
272}
273
274// UpdateMembershipState contacts zero for an update on membership state.
275func UpdateMembershipState(ctx context.Context) error {

Callers 5

StateMethod · 0.92
ProcessBackupRequestFunction · 0.85
ProcessDeleteNsRequestFunction · 0.85
ProcessRestoreRequestFunction · 0.85
ProposeDrainFunction · 0.85

Calls 3

groupsFunction · 0.85
RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by

no test coverage detected