MCPcopy Index your code
hub / github.com/CodisLabs/codis / LoadGroup

Method LoadGroup

pkg/models/store.go:182–192  ·  view source on GitHub ↗
(gid int, must bool)

Source from the content-addressed store, hash-verified

180}
181
182func (s *Store) LoadGroup(gid int, must bool) (*Group, error) {
183 b, err := s.client.Read(s.GroupPath(gid), must)
184 if err != nil || b == nil {
185 return nil, err
186 }
187 g := &Group{}
188 if err := jsonDecode(g, b); err != nil {
189 return nil, err
190 }
191 return g, nil
192}
193
194func (s *Store) UpdateGroup(g *Group) error {
195 return s.client.Update(s.GroupPath(g.Id), g.Encode())

Callers 1

refillCacheGroupMethod · 0.80

Calls 3

GroupPathMethod · 0.95
jsonDecodeFunction · 0.85
ReadMethod · 0.65

Tested by

no test coverage detected