Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPrematureShutdown = errors.New("sensor shutdown before monitor stop")
Functions ¶
This section is empty.
Types ¶
type Sensor ¶
type Sensor struct {
// contains filtered or unexported fields
}
func (*Sensor) Run ¶
Sensor can be in two interchanging (and mutually exclusive) "states":
(I) No monitor is running -> ShutdownSensor command arrives => clean exit -> StartMonitor command arrives => go to state II. -> Any other command => grumble but keep waiting
(II) Monitor is running -> StopMonitor command arrives => stop the mon, dump the report, and go to state I. -> ShutdownSensor command arrives => cancel monitoring, grumble, and exit -> Any other command => grumble but keep waiting
Click to show internal directories.
Click to hide internal directories.