// Keys returns all keys as []string
489760
func (m ConcurrentMap) Keys() []string {
	count := m.Count()
	ch := make(chan string, count)
	go func() {
		// Foreach shard.
		wg := sync.WaitGroup{}
		wg.Add(SHARD_COUNT)
		for _, shard := range m {
			go func(shard *ConcurrentMapShared) {
				// Foreach key, value pair.
				shard.RLock()
				for key := range shard.items {
					ch <- key
				}
				shard.RUnlock()
				wg.Done()
			}(shard)
		}
		wg.Wait()
		close(ch)
	}()

	// Generate keys
	keys := make([]string, 0, count)
	for k := range ch {
		keys = append(keys, k)
	}
	return keys
}
107607
func (m *MemStore) Keys(prefix string) ([]string, error) {
	m.mutex.Lock()
	defer m.mutex.Unlock()
	mk := make([]string, len(m.store))
	i := 0
	for key := range m.store {
		if strings.HasPrefix(key, prefix) {
			mk[i] = key
			i++
		}
	}
	if i == 0 {
		return []string{}, NewKeyNotFound(prefix)
	}
	return mk[0:i], nil
}
89723
func (functions Functions) Keys() KeySet {
	keySet := NewKeySet()

	for _, f := range functions {
		keySet.Add(f.key())
	}

	return keySet
}
946941
func (m Metadata) Keys() []string {
	keys := make([]string, len(m))
	var i int
	for key, _ := range m {
		keys[i] = key
		i += 1
	}
	return keys
}
419900
func (s *GlobalStore) Keys(startKey []byte, limit int) (keys mock.Keys, err error) {
	err = s.client.Call(&keys, "mockStore_keys", startKey, limit)
	return keys, err
}
869263
func (m *SortedMap) Keys() []string {
	keys := make([]string, 0, m.Size())
	m.trie.Allprefixed([]byte{}, func(k []byte, v interface{}) bool {
		keys = append(keys, string(k))
		return true
	})
	return keys
}
802632
func Keys(o *Object) []string {
	if o == nil || o == Undefined {
		return nil
	}
	a := Global.Get("Object").Call("keys", o)
	s := make([]string, a.Length())
	for i := 0; i < a.Length(); i++ {
		s[i] = a.Index(i).String()
	}
	return s
}
534259
func (h *Hash) Keys() (*MrbValue, error) {
	result := C.mrb_hash_keys(h.state, h.value)
	return newValue(h.state, result), nil
}
1091654
func (m *resolversMap) Keys() []string {
	var keys []string
	m.Range(func(key string, value resolver.Resolver) bool {
		keys = append(keys, key)
		return true
	})
	sort.Strings(keys)
	return keys
}
1281413
func (f Filter) Keys() []string {
	keys := make([]string, 0, len(f))

	for key := range f {
		keys = append(keys, key)
	}

	return keys
}
579906
func (m Map) Keys() []string {
	ks := make(map[string]struct{})
	for k, _ := range m {
		idx := strings.Index(k, ".")
		if idx == -1 {
			idx = len(k)
		}

		ks[k[:idx]] = struct{}{}
	}

	result := make([]string, 0, len(ks))
	for k, _ := range ks {
		result = append(result, k)
	}

	return result
}
1019155
func (m *SecureMap) Keys() []interface{} {
	m.lock.RLock()
	keys := make([]interface{}, len(m.data))
	count := 0
	for k := range m.data {
		keys[count] = k
		count++
	}
	m.lock.RUnlock()

	return keys
}
515406
func (t *Object) Keys() []interface{} {
	sl := make([]interface{}, 0, len(t.static))
	for _, p := range t.static {
		sl = append(sl, p.Key)
	}
	return sl
}
1237863
func (p *partition) keys() [][]byte {
	p.mu.RLock()
	keys := make([][]byte, 0, len(p.store))
	for k, v := range p.store {
		if v.count() == 0 {
			continue
		}
		keys = append(keys, []byte(k))
	}
	p.mu.RUnlock()
	return keys
}
1127030
func keys(m map[string]string) (s []string) {
	for k := range m {
		s = append(s, k)
	}
	sort.Strings(s)
	return
}
1306048
func (t *Tree) Keys() []string {
	keys := make([]string, len(t.values))
	i := 0
	for k := range t.values {
		keys[i] = k
		i++
	}
	return keys
}
235954
func (c *Call) keys() []string {
	a := make([]string, 0, len(c.Args))
	for k := range c.Args {
		a = append(a, k)
	}
	sort.Strings(a)
	return a
}