// GetActiveTlfs implement the ActivityStatsStorer interface.
498255
func (s *fileBasedActivityStatsStorer) GetActivesGetter() (
	getter ActivesGetter, err error) {
	tlfStamps, err := ioutil.ReadDir(filepath.Join(s.root, dirnameTlfStamps))
	if err != nil {
		return nil, err
	}
	hostStamps, err := ioutil.ReadDir(filepath.Join(s.root, dirnameHostStamps))
	if err != nil {
		return nil, err
	}
	return &fileinfoActivesGetter{
		tlfs:  tlfStamps,
		hosts: hostStamps,
	}, nil
}
284472
func (c *StatsConnection) GetBufferStats() (*api.BufferStats, error) {
	stats, err := c.statsClient.DumpStats(BufferStatsPrefix)
	if err != nil {
		return nil, err
	}

	bufStats := &api.BufferStats{
		Buffer: map[string]api.BufferPool{},
	}

	for _, stat := range stats {
		d, f := path.Split(stat.Name)
		d = strings.TrimSuffix(d, "/")

		name := strings.TrimPrefix(d, BufferStatsPrefix)
		b, ok := bufStats.Buffer[name]
		if !ok {
			b.PoolName = name
		}

		switch f {
		case BufferStats_Cached:
			b.Cached = scalarStatToFloat64(stat.Data)
		case BufferStats_Used:
			b.Used = scalarStatToFloat64(stat.Data)
		case BufferStats_Available:
			b.Available = scalarStatToFloat64(stat.Data)
		}

		bufStats.Buffer[name] = b
	}

	return bufStats, nil
}
547867
func (c *Client) GetAllocFS(allocID string) (allocdir.AllocDirFS, error) {
	ar, err := c.getAllocRunner(allocID)
	if err != nil {
		return nil, err
	}

	return ar.GetAllocDir(), nil
}
1207307
func GetActiveIdentityKeys(chainID string) ([]string, int64, error) {
	heights, err := GetHeights()
	if err != nil {
		return nil, -1, err
	}
	keys, err := GetActiveIdentityKeysAtHeight(chainID, heights.DirectoryBlockHeight)
	return keys, heights.DirectoryBlockHeight, err
}
286287
func (c *filesystemCollector) GetStats() ([]filesystemStats, error) {
	n, err := unix.Getfsstat(nil, noWait)
	if err != nil {
		return nil, err
	}
	buf := make([]unix.Statfs_t, n)
	_, err = unix.Getfsstat(buf, noWait)
	if err != nil {
		return nil, err
	}
	stats := []filesystemStats{}
	for _, fs := range buf {
		mountpoint := gostring(fs.Mntonname[:])
		if c.ignoredMountPointsPattern.MatchString(mountpoint) {
			log.Debugf("Ignoring mount point: %s", mountpoint)
			continue
		}

		device := gostring(fs.Mntfromname[:])
		fstype := gostring(fs.Fstypename[:])
		if c.ignoredFSTypesPattern.MatchString(fstype) {
			log.Debugf("Ignoring fs type: %s", fstype)
			continue
		}

		var ro float64
		if (fs.Flags & readOnly) != 0 {
			ro = 1
		}

		stats = append(stats, filesystemStats{
			labels: filesystemLabels{
				device:     device,
				mountPoint: mountpoint,
				fsType:     fstype,
			},
			size:      float64(fs.Blocks) * float64(fs.Bsize),
			free:      float64(fs.Bfree) * float64(fs.Bsize),
			avail:     float64(fs.Bavail) * float64(fs.Bsize),
			files:     float64(fs.Files),
			filesFree: float64(fs.Ffree),
			ro:        ro,
		})
	}
	return stats, nil
}
1203752
func (i *instanceManager) AllStats() []*device.DeviceGroupStats {
	i.deviceStatsLock.RLock()
	defer i.deviceStatsLock.RUnlock()
	return i.deviceStats
}
1092662
func (c *ConfigLocal) GetAllSyncedTlfs() []tlf.ID {
	c.lock.RLock()
	defer c.lock.RUnlock()
	tlfs := make([]tlf.ID, 0, len(c.syncedTlfs))
	for tlf, config := range c.syncedTlfs {
		if config.Mode != keybase1.FolderSyncMode_DISABLED {
			tlfs = append(tlfs, tlf)
		}
	}
	return tlfs
}
728605
func (r Network_Storage_MassDataMigration_Request) GetAllRequestStatuses() (resp []datatypes.Network_Storage_MassDataMigration_Request_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllRequestStatuses", nil, &r.Options, &resp)
	return
}
746161
func (t *Template) GetAllAWSIoTAnalyticsDatastoreResources() map[string]*resources.AWSIoTAnalyticsDatastore {
	results := map[string]*resources.AWSIoTAnalyticsDatastore{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSIoTAnalyticsDatastore:
			results[name] = resource
		}
	}
	return results
}
454394
func (c *Frame) GetActiveControl() termboxControl {
	if len(c.controls) >= c.tabIdx {
		if c.controls[c.tabIdx].IsTabSkipped() {
			c.FindNextTabStop()
		}
		return c.controls[c.tabIdx]
	}
	return nil
}
49571
func (obj *Global) GetLogicalDriveStrings(ctx context.Context) ([]*DriveInfo, error) {
	result := &struct {
		Drives []*DriveInfo	`json:"qDrives"`
	} {}
	err := obj.rpc(ctx, "GetLogicalDriveStrings", result)
	return result.Drives, err 
}
615983
func (p *Packfile) GetAll() (storer.EncodedObjectIter, error) {
	return p.GetByType(plumbing.AnyObject)
}
1194384
func PgStatGetActivity(db XODB, v0 int) ([]pgtypes.Record, error) {
	var err error

	// sql query
	const sqlstr = `SELECT pg_catalog.pg_stat_get_activity($1)`

	// run query
	var ret []pgtypes.Record
	XOLog(sqlstr, v0)
	err = db.QueryRow(sqlstr, v0).Scan(&ret)
	if err != nil {
		return nil, err
	}

	return ret, nil
}
123330
func (ss *SecretSyncer) FindActiveKey(ckf *ComputedKeyFamily) (ret *SKB, err error) {
	ss.Lock()
	defer ss.Unlock()

	if ss.keys == nil {
		return nil, nil
	}
	for _, key := range ss.keys.PrivateKeys {
		if ret, _ = key.FindActiveKey(ss.G(), ckf); ret != nil {
			return
		}
	}
	return
}
1150415
func (c *Client) FormationListActive() ([]*ct.ExpandedFormation, error) {
	var formations []*ct.ExpandedFormation
	return formations, c.Get("/formations?active=true", &formations)
}
712309
func (s *Store) SortedActiveAddresses() []WalletAddress {
	s.mtx.RLock()
	defer s.mtx.RUnlock()

	addrs := make([]WalletAddress, 0,
		s.highestUsed+int64(len(s.importedAddrs))+1)
	for i := int64(rootKeyChainIdx); i <= s.highestUsed; i++ {
		a := s.chainIdxMap[i]
		info, ok := s.addrMap[getAddressKey(a)]
		if ok {
			addrs = append(addrs, info)
		}
	}
	for _, addr := range s.importedAddrs {
		addrs = append(addrs, addr)
	}
	return addrs
}
711778
func (az *Cloud) GetActiveZones() (sets.String, error) {
	if az.nodeInformerSynced == nil {
		return nil, fmt.Errorf("Azure cloud provider doesn't have informers set")
	}

	az.nodeCachesLock.Lock()
	defer az.nodeCachesLock.Unlock()
	if !az.nodeInformerSynced() {
		return nil, fmt.Errorf("node informer is not synced when trying to GetActiveZones")
	}

	zones := sets.NewString()
	for zone, nodes := range az.nodeZones {
		if len(nodes) > 0 {
			zones.Insert(zone)
		}
	}
	return zones, nil
}