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

Method LoadProxy

pkg/models/store.go:222–232  ·  view source on GitHub ↗
(token string, must bool)

Source from the content-addressed store, hash-verified

220}
221
222func (s *Store) LoadProxy(token string, must bool) (*Proxy, error) {
223 b, err := s.client.Read(s.ProxyPath(token), must)
224 if err != nil || b == nil {
225 return nil, err
226 }
227 p := &Proxy{}
228 if err := jsonDecode(p, b); err != nil {
229 return nil, err
230 }
231 return p, nil
232}
233
234func (s *Store) UpdateProxy(p *Proxy) error {
235 return s.client.Update(s.ProxyPath(p.Token), p.Encode())

Callers 1

refillCacheProxyMethod · 0.80

Calls 3

ProxyPathMethod · 0.95
jsonDecodeFunction · 0.85
ReadMethod · 0.65

Tested by

no test coverage detected