// Status implements the KBFSOps interface for KBFSOpsStandard
179107
func (fs *KBFSOpsStandard) Status(ctx context.Context) (
	KBFSStatus, <-chan StatusUpdate, error) {
	timeTrackerDone := fs.longOperationDebugDumper.Begin(ctx)
	defer timeTrackerDone()

	session, err := fs.config.KBPKI().GetCurrentSession(ctx)
	var usageBytes, archiveBytes, limitBytes int64 = -1, -1, -1
	var gitUsageBytes, gitArchiveBytes, gitLimitBytes int64 = -1, -1, -1
	// Don't request the quota info until we're sure we've
	// authenticated with our password.  TODO: fix this in the
	// service/GUI by handling multiple simultaneous passphrase
	// requests at once.
	if err == nil && fs.config.MDServer().IsConnected() {
		var quErr error
		_, usageBytes, archiveBytes, limitBytes,
			gitUsageBytes, gitArchiveBytes, gitLimitBytes, quErr =
			fs.quotaUsage.GetAllTypes(
				ctx, quotaUsageStaleTolerance/2, quotaUsageStaleTolerance)
		if quErr != nil {
			// The error is ignored here so that other fields can still be populated
			// even if this fails.
			fs.log.CDebugf(ctx, "Getting quota usage error: %v", quErr)
		}
	}
	failures, ch := fs.currentStatus.CurrentStatus()
	var jManagerStatus *JournalManagerStatus
	jManager, jErr := GetJournalManager(fs.config)
	if jErr == nil {
		status, tlfIDs := jManager.Status(ctx)
		jManagerStatus = &status
		err := FillInJournalStatusUnflushedPaths(
			ctx, fs.config, jManagerStatus, tlfIDs)
		if err != nil {
			// The caller might depend on the channel (e.g., in
			// libfs/remote_status.go), even in the case where err !=
			// nil.
			return KBFSStatus{}, ch, err
		}
		if usageBytes >= 0 {
			usageBytes += status.UnflushedBytes
		}
	}

	dbc := fs.config.DiskBlockCache()
	var dbcStatus map[string]DiskBlockCacheStatus
	if dbc != nil {
		dbcStatus = dbc.Status(ctx)
	}

	dmc := fs.config.DiskMDCache()
	var dmcStatus DiskMDCacheStatus
	if dmc != nil {
		dmcStatus = dmc.Status(ctx)
	}
	dqc := fs.config.DiskQuotaCache()
	var dqcStatus DiskQuotaCacheStatus
	if dqc != nil {
		dqcStatus = dqc.Status(ctx)
	}

	return KBFSStatus{
		CurrentUser:          session.Name.String(),
		IsConnected:          fs.config.MDServer().IsConnected(),
		UsageBytes:           usageBytes,
		ArchiveBytes:         archiveBytes,
		LimitBytes:           limitBytes,
		GitUsageBytes:        gitUsageBytes,
		GitArchiveBytes:      gitArchiveBytes,
		GitLimitBytes:        gitLimitBytes,
		FailingServices:      failures,
		JournalManager:       jManagerStatus,
		DiskBlockCacheStatus: dbcStatus,
		DiskMDCacheStatus:    dmcStatus,
		DiskQuotaCacheStatus: dqcStatus,
	}, ch, err
}
768480
func (r *Response) Status(code int) JResponseWriter {
	r.code = code
	return r
}
1270554
func (kvm *kvmInstance) Status(ctx context.ProviderCallContext) instance.Status {
	if kvm.container.IsRunning() {
		return instance.Status{
			Status:  status.Running,
			Message: "running",
		}
	}
	return instance.Status{
		Status:  status.Stopped,
		Message: "stopped",
	}
}
1353892
func (inst *environInstance) Status(ctx context.ProviderCallContext) instance.Status {
	instStatus := inst.base.Status()
	jujuStatus := status.Provisioning
	switch instStatus {
	case "PROVISIONING", "STAGING":
		jujuStatus = status.Provisioning
	case "RUNNING":
		jujuStatus = status.Running
	case "STOPPING", "TERMINATED":
		jujuStatus = status.Empty
	default:
		jujuStatus = status.Empty
	}
	return instance.Status{
		Status:  jujuStatus,
		Message: instStatus,
	}
}
925225
func (m *Master) Status() (err error) {
	u := url.URL{
		Scheme: "http",
		Host:   m.Url,
		Path:   "/dir/status",
	}
	resp, err := http.Get(u.String())
	if err != nil {
		return
	}

	defer resp.Body.Close()

	status := new(systemStatus)
	if err = decodeJson(resp.Body, status); err != nil {
		log.Println(err)
		return
	}

	if status.Error != "" {
		err = errors.New(status.Error)
		log.Println(err)
		return
	}
	return
}
143029
func (w *keystoreWallet) Status() (string, error) {
	w.keystore.mu.RLock()
	defer w.keystore.mu.RUnlock()

	if _, ok := w.keystore.unlocked[w.account.Address]; ok {
		return "Unlocked", nil
	}
	return "Locked", nil
}
517186
func (m *LocalReleaseModule) Status(r *release.Release, req *services.GetReleaseStatusRequest, env *environment.Environment) (string, error) {
	return env.KubeClient.Get(r.Namespace, bytes.NewBufferString(r.Manifest))
}
686385
func (c *contextUnit) Status() (status.StatusInfo, error) {
	return c.context.status.UnitWorkload(c.Name(), c.expectWorkload)
}
110433
func (d *DiskUsage) Status() (interface{}, error) {
	stats, err := disk.Usage(d.Config.Path)

	if err != nil {
		return nil, fmt.Errorf("Error getting disk usage: %v", err)
	}

	diskUsage := stats.UsedPercent

	if diskUsage >= d.Config.CriticalThreshold {
		return nil, fmt.Errorf("Critical: disk usage too high %.2f percent", diskUsage)
	}

	if diskUsage >= d.Config.WarningThreshold {
		return nil, fmt.Errorf("Warning: disk usage too high %.2f percent", diskUsage)
	}

	return nil, nil
}
191570
func (f Future) Status() string {
	if f.pt == nil {
		return ""
	}
	return f.pt.pollingStatus()
}
142344
func (c *customCheck) Status() (interface{}, error) {
	// perform some sort of check
	if false {
		return nil, fmt.Errorf("Something major just broke")
	}

	// You can return additional information pertaining to the check as long
	// as it can be JSON marshalled
	return map[string]int{"foo": 123, "bar": 456}, nil
}
602944
func (a *Driver) Status() [][2]string {
	ids, _ := loadIds(path.Join(a.rootPath(), "layers"))
	return [][2]string{
		{"Root Dir", a.rootPath()},
		{"Backing Filesystem", backingFs},
		{"Dirs", fmt.Sprintf("%d", len(ids))},
		{"Dirperm1 Supported", fmt.Sprintf("%v", useDirperm())},
	}
}
750690
func (d *dockerClient) Status() *models.Status {
	if d == nil {
		return &models.Status{State: models.StatusStateDisabled}
	}

	if _, err := d.Info(ctx.Background()); err != nil {
		return &models.Status{State: models.StatusStateFailure, Msg: "docker daemon: " + err.Error()}
	}

	return &models.Status{State: models.StatusStateOk, Msg: "docker daemon: OK"}
}
733103
func (srv *Instance) Status() *InstanceStatus {
	stats := srv.Stats()

	return &InstanceStatus{
		Identity:        srv.cfg.Identity,
		Uptime:          srv.UpTime(),
		ConnectedServer: srv.ConnectedServer(),
		LastMessage:     srv.LastProcessedMessage().Unix(),
		Provisioning:    srv.Provisioning(),
		Stats:           &stats,
	}
}
1273516
func Status(serviceName string,
	serviceDescription string,
	redact bool,
	logger *logrus.Logger) error {
	return errors.New("Status not supported for this binary")
}
443334
func (s *OrderService) Status(orderID int64) (Order, error) {

	payload := map[string]interface{}{
		"order_id": orderID,
	}

	req, err := s.client.newAuthenticatedRequest("POST", "order/status", payload)

	if err != nil {
		return Order{}, err
	}

	order := new(Order)
	_, err = s.client.do(req, order)
	if err != nil {
		return *order, err
	}

	return *order, nil
}
955371
func (fs *KBFSOpsStandard) FolderStatus(
	ctx context.Context, folderBranch data.FolderBranch) (
	FolderBranchStatus, <-chan StatusUpdate, error) {
	timeTrackerDone := fs.longOperationDebugDumper.Begin(ctx)
	defer timeTrackerDone()

	ops := fs.getOps(ctx, folderBranch, FavoritesOpNoChange)
	return ops.FolderStatus(ctx, folderBranch)
}