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

Method getGroup

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

Source from the content-addressed store, hash-verified

176}
177
178func (ctx *context) getGroup(gid int) (*models.Group, error) {
179 if g := ctx.group[gid]; g != nil {
180 return g, nil
181 }
182 return nil, errors.Errorf("group-[%d] doesn't exist", gid)
183}
184
185func (ctx *context) getGroupIndex(g *models.Group, addr string) (int, error) {
186 for i, x := range g.Servers {

Callers 14

getGroupFunction · 0.80
TestSlotStateFunction · 0.80
RemoveGroupMethod · 0.80
ResyncGroupMethod · 0.80
GroupAddServerMethod · 0.80
GroupDelServerMethod · 0.80
GroupPromoteServerMethod · 0.80
trySwitchGroupMasterMethod · 0.80
EnableReplicaGroupsMethod · 0.80
TestGroupCacheFunction · 0.80
SlotCreateActionMethod · 0.80
SlotCreateActionSomeMethod · 0.80

Calls 1

ErrorfMethod · 0.80

Tested by 3

getGroupFunction · 0.64
TestSlotStateFunction · 0.64
TestGroupCacheFunction · 0.64