// Status ログなどのステータス情報 取得
8899
func (api *VPCRouterAPI) Status(id int64) (*sacloud.VPCRouterStatus, error) {
	var (
		method = "GET"
		uri    = fmt.Sprintf("%s/%d/status", api.getResourceURL(), id)
		res    = &vpcRouterStatusResponse{}
	)
	err := api.baseAPI.request(method, uri, nil, res)
	if err != nil {
		return nil, err
	}
	return res.VPCRouterStatus, nil
}
151966
func (i sigmaInstance) Status(ctx context.ProviderCallContext) instance.Status {
	entityStatus := i.server.Status()
	logger.Tracef("sigmaInstance.Status: %s", entityStatus)
	jujuStatus := status.Pending
	switch entityStatus {
	case gosigma.ServerStarting:
		jujuStatus = status.Allocating
	case gosigma.ServerRunning:
		jujuStatus = status.Running
	case gosigma.ServerStopping, gosigma.ServerStopped:
		jujuStatus = status.Empty
	case gosigma.ServerUnavailable:
		// I am not sure about this one.
		jujuStatus = status.Pending
	default:
		jujuStatus = status.Pending
	}

	return instance.Status{
		Status:  jujuStatus,
		Message: entityStatus,
	}

}
743072
func (c *Client) Status(timeout time.Duration) (*ServerStatus, error) {
	statusReq := osc.Message{
		Address: statusAddress,
	}
	if err := c.oscConn.Send(statusReq); err != nil {
		return nil, err
	}

	after := time.After(timeout)

	select {
	case _ = <-after:
		return nil, ErrTimeout
	case msg := <-c.statusChan:
		return newStatus(msg)
	case err := <-c.errChan:
		return nil, err
	}
}
1329965
func (i *environInstance) Status(ctx context.ProviderCallContext) instance.Status {
	jujuStatus := status.Pending
	code := i.container.StatusCode
	switch code {
	case api.Starting, api.Started:
		jujuStatus = status.Allocating
	case api.Running:
		jujuStatus = status.Running
	case api.Freezing, api.Frozen, api.Thawed, api.Stopping, api.Stopped:
		jujuStatus = status.Empty
	default:
		jujuStatus = status.Empty
	}
	return instance.Status{
		Status:  jujuStatus,
		Message: code.String(),
	}

}
1127633
func (mi *maas1Instance) Status(ctx context.ProviderCallContext) instance.Status {
	statusMsg, substatus := mi.statusGetter(ctx, mi.Id())
	return convertInstanceStatus(statusMsg, substatus, mi.Id())
}
310378
func (d *Driver) Status() [][2]string {
	return [][2]string{
		{"Backing Filesystem", backingFs},
		{"Supports d_type", strconv.FormatBool(d.supportsDType)},
		{"Native Overlay Diff", strconv.FormatBool(!d.useNaiveDiff())},
		{"Using metacopy", strconv.FormatBool(d.usingMetacopy)},
	}
}
131623
func (sb *SafeBrowser) Status() (Stats, error) {
	stats := Stats{
		QueriesByDatabase: atomic.LoadInt64(&sb.stats.QueriesByDatabase),
		QueriesByCache:    atomic.LoadInt64(&sb.stats.QueriesByCache),
		QueriesByAPI:      atomic.LoadInt64(&sb.stats.QueriesByAPI),
		QueriesFail:       atomic.LoadInt64(&sb.stats.QueriesFail),
		DatabaseUpdateLag: sb.db.UpdateLag(),
	}
	return stats, sb.db.Status()
}
929759
func (c *Client) Status(patterns []string) (*params.FullStatus, error) {
	var result params.FullStatus
	p := params.StatusParams{Patterns: patterns}
	if err := c.facade.FacadeCall("FullStatus", p, &result); err != nil {
		return nil, err
	}
	// Older servers don't fill out model type, but
	// we know a missing type is an "iaas" model.
	if result.Model.Type == "" {
		result.Model.Type = model.IAAS.String()
	}
	return &result, nil
}
1152989
func Status(failpath string) (string, error) {
	failpointsMu.RLock()
	fp := failpoints[failpath]
	failpointsMu.RUnlock()
	if fp == nil {
		return "", ErrNoExist
	}
	fp.mu.RLock()
	t := fp.t
	fp.mu.RUnlock()
	if t == nil {
		return "", ErrDisabled
	}
	return t.desc, nil
}
356870
func (r *Response) Status(status int) *Response {
	if r.chain.failed() {
		return r
	}
	r.checkEqual("status", statusCodeText(status), statusCodeText(r.resp.StatusCode))
	return r
}
137513
func (r *Response) Status(code int) *Response {
	r.StatusCode = code
	return r
}
227336
func (e Entry) Status() Status {
	switch v := e[statusKey].(type) {
	case string:
		return Status(v)
	case Status:
		return v
	default:
		panic(fmt.Sprintf("invalid status: %v", v))
	}
}
543932
func (u *UnitAgent) Status() (status.StatusInfo, error) {
	info, err := getStatus(u.st.db(), u.globalKey(), "agent")
	if err != nil {
		return status.StatusInfo{}, errors.Trace(err)
	}
	// The current health spec says when a hook error occurs, the workload should
	// be in error state, but the state model more correctly records the agent
	// itself as being in error. So we'll do that model translation here.
	// TODO(fwereade): this should absolutely not be happpening in the model.
	// TODO: when fixed, also fix code in status.go for UnitAgent.
	if info.Status == status.Error {
		return status.StatusInfo{
			Status:  status.Idle,
			Message: "",
			Data:    map[string]interface{}{},
			Since:   info.Since,
		}, nil
	}
	return info, nil
}
754789
func (w *trezorDriver) Status() (string, error) {
	if w.failure != nil {
		return fmt.Sprintf("Failed: %v", w.failure), w.failure
	}
	if w.device == nil {
		return "Closed", w.failure
	}
	if w.pinwait {
		return fmt.Sprintf("Trezor v%d.%d.%d '%s' waiting for PIN", w.version[0], w.version[1], w.version[2], w.label), w.failure
	}
	return fmt.Sprintf("Trezor v%d.%d.%d '%s' online", w.version[0], w.version[1], w.version[2], w.label), w.failure
}
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
}
411553
func (s *StatusGetter) Status(args params.Entities) (params.StatusResults, error) {
	result := params.StatusResults{
		Results: make([]params.StatusResult, len(args.Entities)),
	}
	canAccess, err := s.getCanAccess()
	if err != nil {
		return params.StatusResults{}, err
	}
	for i, entity := range args.Entities {
		tag, err := names.ParseTag(entity.Tag)
		if err != nil {
			result.Results[i].Error = ServerError(err)
			continue
		}
		if !canAccess(tag) {
			result.Results[i].Error = ServerError(ErrPerm)
			continue
		}
		result.Results[i] = s.getEntityStatus(tag)
	}
	return result, nil
}
796943
func (j *JournalManager) Status(
	ctx context.Context) (JournalManagerStatus, []tlf.ID) {
	j.lock.RLock()
	defer j.lock.RUnlock()
	var totalStoredBytes, totalStoredFiles, totalUnflushedBytes int64
	tlfIDs := make([]tlf.ID, 0, len(j.tlfJournals))
	for _, tlfJournal := range j.tlfJournals {
		storedBytes, storedFiles, unflushedBytes, err :=
			tlfJournal.getByteCounts()
		if err != nil {
			j.log.CWarningf(ctx,
				"Couldn't calculate stored bytes/stored files/unflushed bytes for %s: %+v",
				tlfJournal.tlfID, err)
		}
		totalStoredBytes += storedBytes
		totalStoredFiles += storedFiles
		totalUnflushedBytes += unflushedBytes
		tlfIDs = append(tlfIDs, tlfJournal.tlfID)
	}
	enableAuto, enableAutoSetByUser := j.getEnableAutoLocked()
	return JournalManagerStatus{
		RootDir:             j.rootPath(),
		Version:             1,
		CurrentUID:          j.currentUID,
		CurrentVerifyingKey: j.currentVerifyingKey,
		EnableAuto:          enableAuto,
		EnableAutoSetByUser: enableAutoSetByUser,
		JournalCount:        len(tlfIDs),
		StoredBytes:         totalStoredBytes,
		StoredFiles:         totalStoredFiles,
		UnflushedBytes:      totalUnflushedBytes,
		DiskLimiterStatus: j.config.DiskLimiter().getStatus(
			ctx, j.currentUID.AsUserOrTeam()),
	}, tlfIDs
}