()
| 113 | } |
| 114 | |
| 115 | func (c *CpApiServer) StartNodeMonitoringLoop() chan struct{} { |
| 116 | if !c.LeaderElectionServer.IsLeader() { |
| 117 | logrus.Errorf("Cannot start node monitoring loop as this " + |
| 118 | "instance of control plane is currently not the leader. " + |
| 119 | "Probably lost leadership in the meanwhile.") |
| 120 | |
| 121 | return nil |
| 122 | } |
| 123 | |
| 124 | return c.ControlPlane.StartNodeMonitoring() |
| 125 | } |
| 126 | |
| 127 | func (c *CpApiServer) OnMetricsReceive(ctx context.Context, metric *proto.AutoscalingMetric) (*proto.ActionStatus, error) { |
| 128 | if !c.LeaderElectionServer.IsLeader() { |
no test coverage detected