MCPcopy Create free account
hub / github.com/facebook/time / FetchStatus

Method FetchStatus

calnex/api/api.go:724–742  ·  view source on GitHub ↗

FetchStatus returns the calnex status

()

Source from the content-addressed store, hash-verified

722}
723
724// FetchStatus returns the calnex status
725func (a *API) FetchStatus() (*Status, error) {
726 url := fmt.Sprintf(getStatusURL, a.source)
727 resp, err := a.Client.Get(url)
728 if err != nil {
729 return nil, err
730 }
731 defer resp.Body.Close()
732
733 if resp.StatusCode != http.StatusOK {
734 return nil, errors.New(http.StatusText(resp.StatusCode))
735 }
736
737 s := &Status{}
738 if err = json.NewDecoder(resp.Body).Decode(s); err != nil {
739 return nil, err
740 }
741
742 return s, nil
743}
744
745// FetchInstrumentStatus returns the calnex instrument status

Callers 6

RunMethod · 0.95
FirmwareMethod · 0.95
ClearDeviceMethod · 0.95
RebootMethod · 0.95
TestFetchStatusFunction · 0.95
ConfigFunction · 0.95

Calls 2

CloseMethod · 0.65
GetMethod · 0.45

Tested by 1

TestFetchStatusFunction · 0.76