@@ -279,11 +279,6 @@ type Coordinator struct {
279
279
280
280
// mx sync.RWMutex
281
281
// protection protection.Config
282
-
283
- // a sync channel that can be called by other components to check if the main coordinator
284
- // loop in runLoopIteration() is active and listening.
285
- // Should only be interacted with via CoordinatorActive() or runLoopIteration()
286
- heartbeatChan chan struct {}
287
282
}
288
283
289
284
// The channels Coordinator reads to receive updates from the various managers.
@@ -377,7 +372,6 @@ func New(logger *logger.Logger, cfg *configuration.Configuration, logLevel logp.
377
372
logLevelCh : make (chan logp.Level ),
378
373
overrideStateChan : make (chan * coordinatorOverrideState ),
379
374
upgradeDetailsChan : make (chan * details.Details ),
380
- heartbeatChan : make (chan struct {}),
381
375
}
382
376
// Setup communication channels for any non-nil components. This pattern
383
377
// lets us transparently accept nil managers / simulated events during
@@ -418,22 +412,6 @@ func (c *Coordinator) State() State {
418
412
return c .stateBroadcaster .Get ()
419
413
}
420
414
421
- // CoordinatorActive is a blocking method that waits for a channel response
422
- // from the coordinator loop. This can be used to as a basic health check,
423
- // as we'll timeout and return false if the coordinator run loop doesn't
424
- // respond to our channel.
425
- func (c * Coordinator ) CoordinatorActive (timeout time.Duration ) bool {
426
- ctx , cancel := context .WithTimeout (context .Background (), timeout )
427
- defer cancel ()
428
-
429
- select {
430
- case <- c .heartbeatChan :
431
- return true
432
- case <- ctx .Done ():
433
- return false
434
- }
435
- }
436
-
437
415
func (c * Coordinator ) RegisterMonitoringServer (s configReloader ) {
438
416
c .monitoringServerReloader = s
439
417
}
@@ -999,8 +977,6 @@ func (c *Coordinator) runLoopIteration(ctx context.Context) {
999
977
case upgradeDetails := <- c .upgradeDetailsChan :
1000
978
c .setUpgradeDetails (upgradeDetails )
1001
979
1002
- case c .heartbeatChan <- struct {}{}:
1003
-
1004
980
case componentState := <- c .managerChans .runtimeManagerUpdate :
1005
981
// New component change reported by the runtime manager via
1006
982
// Coordinator.watchRuntimeComponents(), merge it with the
0 commit comments