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

Method store

pkg/utils/redis/client.go:465–477  ·  view source on GitHub ↗
(addr string, info map[string]string)

Source from the content-addressed store, hash-verified

463}
464
465func (s *InfoCache) store(addr string, info map[string]string) map[string]string {
466 s.mu.Lock()
467 defer s.mu.Unlock()
468 if s.data == nil {
469 s.data = make(map[string]map[string]string)
470 }
471 if info != nil {
472 s.data[addr] = info
473 } else if s.data[addr] == nil {
474 s.data[addr] = make(map[string]string)
475 }
476 return s.data[addr]
477}
478
479func (s *InfoCache) Get(addr string) map[string]string {
480 info := s.load(addr)

Callers 1

GetMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected