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

Method Reboot

calnex/api/api.go:990–999  ·  view source on GitHub ↗

Reboot the device

()

Source from the content-addressed store, hash-verified

988}
989
990// Reboot the device
991func (a *API) Reboot(reset bool) error {
992 // reset is not graceful, execute immediately
993 if reset {
994 return a.get(resetURL)
995 }
996
997 // check measurement status
998 status, err := a.FetchStatus()
999
1000 if err == nil && status.MeasurementActive {
1001 // stop measurement if possible
1002 _ = a.StopMeasure()

Callers 2

rebootFunction · 0.95
TestGetFunction · 0.95

Calls 3

FetchStatusMethod · 0.95
StopMeasureMethod · 0.95
getMethod · 0.95

Tested by 1

TestGetFunction · 0.76