Add tlsconmon component
This commit is contained in:
@@ -62,6 +62,8 @@ func (sm *StepMonitor) Start() {
|
||||
} else {
|
||||
stepCertError.WithLabelValues(sm.RootID).Set(0)
|
||||
}
|
||||
secondsLeft := time.Until(sm.certificate.NotAfter).Seconds()
|
||||
stepCertTimeLeft.WithLabelValues(sm.RootID).Set(secondsLeft)
|
||||
|
||||
timerCertFetch := time.NewTimer(5 * time.Minute)
|
||||
defer timerCertFetch.Stop()
|
||||
@@ -87,7 +89,6 @@ func (sm *StepMonitor) Start() {
|
||||
timerUpdateMonitor.Reset(1 * time.Second)
|
||||
|
||||
case <-sm.shutdownCh:
|
||||
close(sm.shutdownCh)
|
||||
sm.shutdownComplete <- struct{}{}
|
||||
return
|
||||
}
|
||||
@@ -96,6 +97,8 @@ func (sm *StepMonitor) Start() {
|
||||
|
||||
func (sm *StepMonitor) Shutdown() error {
|
||||
sm.shutdownCh <- struct{}{}
|
||||
close(sm.shutdownCh)
|
||||
|
||||
<-sm.shutdownComplete
|
||||
close(sm.shutdownComplete)
|
||||
sm.logger.Info("Monitoring stopped")
|
||||
|
Reference in New Issue
Block a user