MCPcopy
hub / github.com/CodisLabs/codis / getGroupMaster

Method getGroupMaster

pkg/topom/context.go:233–238  ·  view source on GitHub ↗
(gid int)

Source from the content-addressed store, hash-verified

231}
232
233func (ctx *context) getGroupMaster(gid int) string {
234 if g := ctx.group[gid]; g != nil && len(g.Servers) != 0 {
235 return g.Servers[0].Addr
236 }
237 return ""
238}
239
240func (ctx *context) getGroupMasters() map[int]string {
241 var masters = make(map[int]string)

Callers 3

toSlotMethod · 0.95
TestSlotStateFunction · 0.80
newSlotActionExecutorMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestSlotStateFunction · 0.64