MCPcopy
hub / github.com/google/seesaw / monitoring

Method monitoring

ecu/core.go:117–133  ·  view source on GitHub ↗

monitoring starts an HTTP server for monitoring purposes.

()

Source from the content-addressed store, hash-verified

115
116// monitoring starts an HTTP server for monitoring purposes.
117func (e *ECU) monitoring() {
118 ln, err := net.Listen("tcp", e.cfg.MonitorAddress)
119 if err != nil {
120 log.Fatal("listen error:", err)
121 }
122
123 monitorHTTP := &http.Server{
124 ReadTimeout: 30 * time.Second,
125 WriteTimeout: 30 * time.Second,
126 MaxHeaderBytes: 1 << 20,
127 }
128 go monitorHTTP.Serve(ln)
129
130 <-e.shutdownMonitor
131 ln.Close()
132 e.shutdownMonitor <- true
133}
134
135// controlTLSConfig returns a TLS configuration for use by the control server.
136func (e *ECU) controlTLSConfig() (*tls.Config, error) {

Callers 1

RunMethod · 0.95

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected