// Status returns a human friendly string for the status.
337402
func (b *Build) HumanStatus() string {
	switch b.Status {
	case buildbucketpb.Status_SCHEDULED:
		return "Pending"
	case buildbucketpb.Status_STARTED:
		return "Running"
	case buildbucketpb.Status_SUCCESS:
		return "Success"
	case buildbucketpb.Status_FAILURE:
		return "Failure"
	case buildbucketpb.Status_INFRA_FAILURE:
		return "Infra Failure"
	case buildbucketpb.Status_CANCELED:
		return "Cancelled"
	default:
		return "Unknown status"
	}
}
805389
func (c *OperatorRekeyCommand) status(client *api.Client) int {
	// Handle the different API requests
	var fn func() (interface{}, error)
	switch strings.ToLower(strings.TrimSpace(c.flagTarget)) {
	case "barrier":
		fn = func() (interface{}, error) {
			return client.Sys().RekeyStatus()
		}
		if c.flagVerify {
			fn = func() (interface{}, error) {
				return client.Sys().RekeyVerificationStatus()
			}
		}
	case "recovery", "hsm":
		fn = func() (interface{}, error) {
			return client.Sys().RekeyRecoveryKeyStatus()
		}
		if c.flagVerify {
			fn = func() (interface{}, error) {
				return client.Sys().RekeyRecoveryKeyVerificationStatus()
			}
		}
	default:
		c.UI.Error(fmt.Sprintf("Unknown target: %s", c.flagTarget))
		return 1
	}

	// Make the request
	status, err := fn()
	if err != nil {
		c.UI.Error(fmt.Sprintf("Error reading rekey status: %s", err))
		return 2
	}

	return c.printStatus(status)
}
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
	}
}
768480
func (r *Response) Status(code int) JResponseWriter {
	r.code = code
	return r
}
96267
func (nc *Conn) Status() Status {
	nc.mu.RLock()
	defer nc.mu.RUnlock()
	return nc.status
}
180754
func (m *Model) Status() (status.StatusInfo, error) {
	modelStatus, err := getStatus(m.st.db(), m.globalKey(), "model")
	if err != nil {
		return modelStatus, err
	}
	return modelStatus, nil
}
433732
func (c *Client) Status(serial string) (hostmgr.Host, error) {
	var host hostmgr.Host

	resp, err := http.Get(fmt.Sprintf("%s://%s:%d/admin/hosts", c.Scheme, c.Host, c.Port))
	if err != nil {
		return host, microerror.Mask(err)
	}
	defer resp.Body.Close()
	if resp.StatusCode > 399 {
		return host, microerror.Mask(fmt.Errorf("invalid status code '%d'", resp.StatusCode))
	}

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return host, microerror.Mask(err)
	}

	list := []hostmgr.Host{}
	err = json.Unmarshal(body, &list)
	if err != nil {
		return host, microerror.Mask(err)
	}

	for _, host = range list {
		if host.Serial == serial {
			return host, nil
		}
	}

	return host, microerror.Mask(fmt.Errorf("host %s not found", serial))
}
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",
	}
}
167957
func (pool *Pool) Status(addr, handle string) (status *Status, err error) {
	if client, ok := pool.Clients[addr]; ok {
		client.Lock()
		defer client.Unlock()
		status, err = client.Status(handle)
	} else {
		err = ErrNotFound
	}
	return
}
729253
func (hc *Check) Status() Status {
	hc.lock.RLock()
	defer hc.lock.RUnlock()
	status := Status{
		LastCheck: hc.start,
		Failures:  hc.failures,
		Successes: hc.successes,
		State:     hc.state,
	}
	if hc.result != nil {
		status.Duration = hc.result.Duration
		status.Message = hc.result.String()
	}
	return status
}
614077
func (d *Daemon) Status() (pid int, err error) {
	p, err := d.Process()
	if err != nil {
		return 0, err
	}
	return p.Pid, p.Signal(syscall.Signal(0x0))
}
1281307
func (m *Machine) Status() (params.StatusResult, error) {
	var results params.StatusResults
	args := params.Entities{Entities: []params.Entity{
		{Tag: m.tag.String()},
	}}
	err := m.facade.FacadeCall("Status", args, &results)
	if err != nil {
		return params.StatusResult{}, errors.Trace(err)
	}
	if len(results.Results) != 1 {
		err := errors.Errorf("expected 1 result, got %d", len(results.Results))
		return params.StatusResult{}, err
	}
	result := results.Results[0]
	if result.Error != nil {
		return params.StatusResult{}, result.Error
	}
	return result, 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
}
518884
func (v *Volume) Status() (err error) {
	resp, err := http.Get(fmt.Sprintf("%s/status", v.PublicUrl()))
	if err != nil {
		return
	}

	defer resp.Body.Close()

	status := new(volumeStatus)
	decoder := json.NewDecoder(resp.Body)
	if err = decoder.Decode(status); err != nil {
		log.Println(err)
		return
	}

	if status.Error != "" {
		err = errors.New(status.Error)
		log.Println(err)
		return
	}
	return
}
978029
func (options *FontOptions) status() error {
	ret := Status(C.cairo_font_options_status(options.Ptr)).toError()
	return ret
}
1103566
func (client *Client) Status(handle string) (status *Status, err error) {
	if client.conn == nil {
		return nil, ErrLostConn
	}
	var mutex sync.Mutex
	mutex.Lock()
	client.innerHandler.put("s"+handle, func(resp *Response) {
		defer mutex.Unlock()
		var err error
		status, err = resp._status()
		if err != nil {
			client.err(err)
		}
	})
	req := getRequest()
	req.DataType = dtGetStatus
	req.Data = []byte(handle)
	client.write(req)
	mutex.Lock()
	return
}
1273516
func Status(serviceName string,
	serviceDescription string,
	redact bool,
	logger *logrus.Logger) error {
	return errors.New("Status not supported for this binary")
}