type worker … // Creates and starts a new probe worker. func newWorker( m *manager, probeType probeType, pod *v1.Pod, container v1.Container) *worker { … } // run periodically probes the container. func (w *worker) run() { … } // stop stops the probe worker. The worker handles cleanup and removes itself from its manager. // It is safe to call stop multiple times. func (w *worker) stop() { … } // doProbe probes the container once and records the result. // Returns whether the worker should continue. func (w *worker) doProbe(ctx context.Context) (keepGoing bool) { … } func deepCopyPrometheusLabels(m metrics.Labels) metrics.Labels { … }