// Get loads the given key from Consul.
165302
func (b *Backend) Get(ctx context.Context, key string) ([]byte, error) {
	if b.cache == nil && b.prefetch {
		err := b.fetchTree(ctx)
		if err != nil {
			return nil, err
		}
	}

	if b.cache != nil {
		return b.fromCache(ctx, key)
	}

	var opt api.QueryOptions

	kv, _, err := b.client.KV().Get(path.Join(b.prefix, key), opt.WithContext(ctx))
	if err != nil {
		return nil, err
	}

	if kv == nil {
		return nil, backend.ErrNotFound
	}

	return kv.Value, nil
}
696131
func (h *loaderHandler) Get(key string, args ...interface{}) (interface{}, error) {
	return h.handler.Get(key, args...)
}
1121944
func (rkv *KeyValue) Get(key string) (string, error) {
	conn := rkv.pool.Get(rkv.dbindex)
	result, err := redis.String(conn.Do("GET", rkv.id+":"+key))
	if err != nil {
		return "", err
	}
	return result, nil
}
1357759
func (c *Client) Get(ctx context.Context, container, key string) (body io.ReadCloser, size int64, err error) {
	req := newReq(ctx, c.keyURL(container, key))
	c.Auth.SignRequest(req)
	res, err := c.transport().RoundTrip(req)
	if err != nil {
		return
	}
	switch res.StatusCode {
	case http.StatusOK:
		return res.Body, res.ContentLength, nil
	case http.StatusNotFound:
		res.Body.Close()
		return nil, 0, os.ErrNotExist
	default:
		res.Body.Close()
		return nil, 0, fmt.Errorf("azure HTTP error on GET: %d", res.StatusCode)
	}
}
130830
func (i RedisClientWrapper) Get(key string) ([]byte, error) {
	val, ok := i.Client.Get(key).Result()
	if ok != nil {
		return nil, fmt.Errorf("Error: %s", ok)
	}
	return []byte(val), nil
}
353916
func (k *KV) Get(key string, q *QueryOptions) (*KVPair, *QueryMeta, error) {
	resp, qm, err := k.getInternal(key, nil, q)
	if err != nil {
		return nil, nil, err
	}
	if resp == nil {
		return nil, qm, nil
	}
	defer resp.Body.Close()

	var entries []*KVPair
	if err := decodeBody(resp, &entries); err != nil {
		return nil, nil, err
	}
	if len(entries) > 0 {
		return entries[0], qm, nil
	}
	return nil, qm, nil
}
1038317
func (b *AESGCMBarrier) Get(ctx context.Context, key string) (*logical.StorageEntry, error) {
	return b.lockSwitchedGet(ctx, key, true)
}
1066389
func (s *MysqlStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
588447
func (c *Cache) Get(key interface{}) (value interface{}, ok bool) {
	c.lock.Lock()
	value, ok = c.lru.Get(key)
	c.lock.Unlock()
	return value, ok
}
998207
func (r *RequestContext) Get(key string) interface{} {
	r.mutex.RLock()
	defer r.mutex.RUnlock()
	return r.store[key]
}
745717
func (c *Container) Get(key interface{}) (interface{}, error) {

	for k := 0; k < c.length; k++ {
		if equal(c.items[k].Key, key) {
			return c.items[k].Value, nil
		}
	}
	if c.length < num {
		return nil, errNOTFOUND
	}
	if c.next == nil {
		return nil, errNOTFOUND
	}
	return c.next.Get(key)
}
621924
func (r *Memory) Get(key string) (interface{}, error) {
	r.Lock()
	defer r.Unlock()

	return r.cache.Get(key)
}
513077
func (s *DB) Get(name string) (value interface{}, ok bool) {
	value, ok = s.values.Load(name)
	return
}
757741
func (s *NodbStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
119432
func (kv *KV) Get(key []byte) (value []byte) {
	value, _ = kv.db.Get(key, nil)
	return
}
819422
func (d *ResourceDiff) Get(key string) interface{} {
	r, _ := d.GetOk(key)
	return r
}
911824
func (kv *KV) Get(key []byte) (value []byte) {
	rows, err := kv.db.Query(
		fmt.Sprintf("SELECT v FROM %s WHERE id=? LIMIT 1", string(kv.table)),
		kv.id(key),
	)
	if err != nil {
		return
	}
	defer rows.Close()
	if rows.Next() {
		var s string
		err = rows.Scan(&s)
		value = gkv.Stob(s)
	}
	return
}