MCPcopy Index your code
hub / github.com/dropbox/godropbox / GetMulti

Method GetMulti

memcache/raw_binary_client.go:361–386  ·  view source on GitHub ↗

See Client interface for documentation.

(keys []string)

Source from the content-addressed store, hash-verified

359
360// See Client interface for documentation.
361func (c *RawBinaryClient) GetMulti(keys []string) map[string]GetResponse {
362 if keys == nil {
363 return nil
364 }
365
366 responses := make(map[string]GetResponse)
367 cacheKeys := c.removeDuplicateKey(keys)
368
369 c.mutex.Lock()
370 defer c.mutex.Unlock()
371
372 for _, key := range cacheKeys {
373 if resp := c.sendGetRequest(key); resp != nil {
374 responses[key] = resp
375 }
376 }
377
378 for _, key := range cacheKeys {
379 if _, inMap := responses[key]; inMap { // error occurred while sending
380 continue
381 }
382 responses[key] = c.receiveGetResponse(key)
383 }
384
385 return responses
386}
387
388func (c *RawBinaryClient) GetSentinels(keys []string) map[string]GetResponse {
389 // For raw clients, there are no difference between GetMulti and

Callers 1

GetSentinelsMethod · 0.95

Calls 5

removeDuplicateKeyMethod · 0.95
sendGetRequestMethod · 0.95
receiveGetResponseMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected