// Get will retrieve a message from the store, the one associated with
// the provided key value.
6329
func (store *FileStore) Get(key string) packets.ControlPacket {
	store.RLock()
	defer store.RUnlock()
	if !store.opened {
		ERROR.Println(STR, "Trying to use file store, but not open")
		return nil
	}
	filepath := fullpath(store.directory, key)
	if !exists(filepath) {
		return nil
	}
	mfile, oerr := os.Open(filepath)
	chkerr(oerr)
	msg, rerr := packets.ReadPacket(mfile)
	chkerr(mfile.Close())

	// Message was unreadable, return nil
	if rerr != nil {
		newpath := corruptpath(store.directory, key)
		WARN.Println(STR, "corrupted file detected:", rerr.Error(), "archived at:", newpath)
		os.Rename(filepath, newpath)
		return nil
	}
	return msg
}
987078
func (c standardConfigManager) Get(key string) ([]byte, error) {
	value, err := c.store.Get(key)
	if err != nil {
		return nil, err
	}
	return value, err
}
1342621
func (d *MutexDatastore) Get(key ds.Key) (value []byte, err error) {
	d.RLock()
	defer d.RUnlock()
	return d.child.Get(key)
}
159213
func (e *Store) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
	obj := e.NewFunc()
	key, err := e.KeyFunc(ctx, name)
	if err != nil {
		return nil, err
	}
	if err := e.Storage.Get(ctx, key, options.ResourceVersion, obj, false); err != nil {
		return nil, storeerr.InterpretGetError(err, e.qualifiedResourceFromContext(ctx), name)
	}
	if e.Decorator != nil {
		if err := e.Decorator(obj); err != nil {
			return nil, err
		}
	}
	return obj, nil
}
564927
func (n *NodeStore) Get(key []byte) (data []byte, err error) {
	return n.store.Get(n.addr, key)
}
974770
func (s *PostgresStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
327063
func (j *Json) Get(key string) *Json {
	m, err := j.Map()
	if err == nil {
		if val, ok := m[key]; ok {
			return &Json{val}
		}
	}
	return &Json{nil}
}
619375
func (mem *Memcache) Get(key string) interface{} {
	var err error
	var item *memcache.Item
	if item, err = mem.conn.Get(key); err != nil {
		return nil
	}
	var result interface{}
	if err = json.Unmarshal(item.Value, &result); err != nil {
		return nil
	}
	return result
}
676571
func (s *storeImpl) get(ctx datastore.Context, id string) (*Service, error) {
	svc := &Service{}
	if err := s.ds.Get(ctx, Key(id), svc); err != nil {
		return nil, err
	}
	return svc, nil
}
67229
func (tx *Tx) Get(key []byte) []byte {
	return tx.reader.Get(key)
}
528897
func (c *Controller) Get(key interface{}) interface{} {
	c.instance.StorageMu.RLock()
	defer c.instance.StorageMu.RUnlock()
	return c.instance.Storage[key]
}
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
}
1360412
func (c configManager) Get(key string) ([]byte, error) {
	value, err := c.store.Get(key)
	if err != nil {
		return nil, err
	}
	return secconf.Decode(value, bytes.NewBuffer(c.keystore))
}
908115
func (s *RedisMapStore) Get(key string) (interface{}, error) {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	result, err := s.client.HGetAll(key).Result()
	if err == redis.Nil || len(result) == 0 {
		return nil, errors.NewErrNotFound(key)
	}
	if err != nil {
		return nil, err
	}
	result, _ = s.migrate(key, result)
	i, err := s.decoder(result)
	if err != nil {
		return nil, err
	}
	return i, nil
}
1066389
func (s *MysqlStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
580121
func (s *memcachedStorage) Get(key string) (interface{}, error) {
	memcachedItem, err := s.c.Get(key)
	if err != nil && err.Error() == "memcache: cache miss" {
		return nil, ErrCacheItemNotFound
	}

	if err != nil {
		return nil, err
	}

	item := &cachedItem{}

	err = decodeGob(memcachedItem.Value, item)
	if err != nil {
		return nil, err
	}

	return item.Val, nil
}
114432
func (s *GlobalStore) Get(addr common.Address, key []byte) (data []byte, err error) {
	s.mu.RLock()
	defer s.mu.RUnlock()

	if _, has := s.nodeKeyIndex(addr, key); !has {
		return nil, mock.ErrNotFound
	}

	data, ok := s.data[string(key)]
	if !ok {
		return nil, mock.ErrNotFound
	}
	return data, nil
}