initMonitor initializes the configuration for the pilot monitoring server.
(addr string)
| 123 | |
| 124 | // initMonitor initializes the configuration for the pilot monitoring server. |
| 125 | func (s *Server) initMonitor(addr string) error { // nolint: unparam |
| 126 | s.addStartFunc("monitoring", func(stop <-chan struct{}) error { |
| 127 | monitor, err := startMonitor(s.metricsExporter, addr, s.monitoringMux) |
| 128 | if err != nil { |
| 129 | return err |
| 130 | } |
| 131 | go func() { |
| 132 | <-stop |
| 133 | err := monitor.Close() |
| 134 | log.Debugf("Monitoring server terminated: %v", err) |
| 135 | }() |
| 136 | return nil |
| 137 | }) |
| 138 | return nil |
| 139 | } |
no test coverage detected