// get is goroutine safe and will return a ssh.Signer for a principal from
// the cache.
513934
func (c *certificateCache) get(addr string) (ssh.Signer, bool) {
	c.mu.Lock()
	defer c.mu.Unlock()

	certificate, ok := c.cache.Get(addr)
	if !ok {
		return nil, false
	}

	certificateSigner, ok := certificate.(ssh.Signer)
	if !ok {
		return nil, false
	}

	return certificateSigner, true
}
11865
func (c cache) Get(key string) (resp []byte, ok bool) {
	item, err := redis.Bytes(c.Do("GET", cacheKey(key)))
	if err != nil {
		return nil, false
	}
	return item, true
}
966676
func (c *BufferLRU) Get(key int64) ([]byte, bool) {
	c.mut.Lock()
	defer c.mut.Unlock()

	ee, ok := c.cache[key]
	if !ok {
		return nil, false
	}

	c.ll.MoveToFront(ee)
	return ee.Value.(buffer).Slice, true
}
196475
func (c *lruCache) Get(id uint64) uint64 {
	n, _ := c.cache.Get(id)
	nn, _ := n.(uint64)
	return nn
}
744930
func (s *Safe) Get() interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()
	return s.value
}
727232
func (e *PrincipalService) Get(name string) (principal Principal, err error) {
	url := fmt.Sprintf("principals/%s", name)
	err = e.client.magicRequestDecoder("GET", url, nil, &principal)
	return
}
415833
func (ng *memAutoCertCache) Get(ctx context.Context, key string) ([]byte, error) {
	ng.mtx.Lock()
	defer ng.mtx.Unlock()
	val, ok := ng.kv[key]
	if ok {
		return val, nil
	}
	return nil, autocert.ErrCacheMiss
}
720291
func (c *pubKeyCache) get(user string, pubKeyData []byte) (cachedPubKey, bool) {
	for _, k := range c.keys {
		if k.user == user && bytes.Equal(k.pubKeyData, pubKeyData) {
			return k, true
		}
	}
	return cachedPubKey{}, false
}
397356
func (c *LRUExpireCache) Get(key interface{}) (interface{}, bool) {
	c.lock.Lock()
	defer c.lock.Unlock()
	e, ok := c.cache.Get(key)
	if !ok {
		return nil, false
	}
	if c.clock.Now().After(e.(*cacheEntry).expireTime) {
		c.cache.Remove(key)
		return nil, false
	}
	return e.(*cacheEntry).value, true
}
5946
func (c *Credentials) Get() (Value, error) {
	c.m.Lock()
	defer c.m.Unlock()
	return c.provider.Retrieve()
}
621924
func (r *Memory) Get(key string) (interface{}, error) {
	r.Lock()
	defer r.Unlock()

	return r.cache.Get(key)
}
1351251
func (c *ARCCache) Get(key interface{}) (value interface{}, ok bool) {
	c.lock.Lock()
	defer c.lock.Unlock()

	// If the value is contained in T1 (recent), then
	// promote it to T2 (frequent)
	if val, ok := c.t1.Peek(key); ok {
		c.t1.Remove(key)
		c.t2.Add(key, val)
		return val, ok
	}

	// Check if the value is contained in T2 (frequent)
	if val, ok := c.t2.Get(key); ok {
		return val, ok
	}

	// No hit
	return nil, false
}
1319353
func (cache autocertCache) Get(ctx context.Context, name string) ([]byte, error) {
	coll, closeColl := cache.coll()
	defer closeColl()
	var doc autocertCacheDoc
	err := coll.FindId(name).One(&doc)
	if err == nil {
		return doc.Data, nil
	}
	if errors.Cause(err) == mgo.ErrNotFound {
		return nil, autocert.ErrCacheMiss
	}
	return nil, errors.Annotatef(err, "cannot get autocert key %q", name)
}
1155321
func (cache *Cache) Get(key string, params imageserver.Params) (*imageserver.Image, error) {
	value, ok := cache.lru.Get(key)
	if !ok {
		return nil, nil
	}
	item := value.(*item)
	image := item.image
	return image, nil
}
1284259
func (t *TSCache) Get(key string) (time.Time, bool) {
	t.mux.RLock()
	defer t.mux.RUnlock()
	ts, ok := t.table[key]
	return ts, ok
}
650456
func (c *FakeSSHCredentials) Get(name string, options v1.GetOptions) (result *v1alpha1.SSHCredential, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(sshcredentialsResource, c.ns, name), &v1alpha1.SSHCredential{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.SSHCredential), err
}
766315
func (sshKeyApi *SSHKeyApi) Get(name string) (*SSHKey, error) {
	data, err := sshKeyApi.entityService.Get(name, map[string]string{})
	if err != nil {
		return nil, err
	}
	return parseSSHKey(data), nil
}