MCPcopy
hub / github.com/istio/istio / initMonitor

Method initMonitor

pilot/pkg/bootstrap/monitoring.go:125–139  ·  view source on GitHub ↗

initMonitor initializes the configuration for the pilot monitoring server.

(addr string)

Source from the content-addressed store, hash-verified

123
124// initMonitor initializes the configuration for the pilot monitoring server.
125func (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}

Callers 1

initIstiodAdminServerMethod · 0.95

Calls 4

addStartFuncMethod · 0.95
DebugfFunction · 0.92
startMonitorFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected