Run starts the ECU.
()
| 90 | |
| 91 | // Run starts the ECU. |
| 92 | func (e *ECU) Run() { |
| 93 | if err := e.cfg.Authenticator.AuthInit(); err != nil { |
| 94 | log.Warningf("Failed to initialise authentication, remote control will likely fail: %v", err) |
| 95 | } |
| 96 | |
| 97 | stats := newECUStats(e) |
| 98 | stats.notify(e.cfg.StatsPublishers...) |
| 99 | go stats.run() |
| 100 | |
| 101 | go e.control() |
| 102 | go e.monitoring() |
| 103 | |
| 104 | <-e.shutdown |
| 105 | e.shutdownControl <- true |
| 106 | e.shutdownMonitor <- true |
| 107 | <-e.shutdownControl |
| 108 | <-e.shutdownMonitor |
| 109 | } |
| 110 | |
| 111 | // Shutdown notifies the ECU to shutdown. |
| 112 | func (e *ECU) Shutdown() { |
no test coverage detected