(ctx context.Context, config config2.ControlPlaneConfig)
| 272 | } |
| 273 | |
| 274 | func (c *CpApiServer) ReconstructState(ctx context.Context, config config2.ControlPlaneConfig) error { |
| 275 | if !c.LeaderElectionServer.IsLeader() { |
| 276 | // This API call is not exposed to the outside, but it's called only on process startup |
| 277 | return errors.New("cannot request cluster state reconstruction if not the leader. " + |
| 278 | "Perhaps the leader has changed in the meanwhile") |
| 279 | } |
| 280 | |
| 281 | return c.ControlPlane.ReconstructState(ctx, config, c.HAProxyAPI) |
| 282 | } |
| 283 | |
| 284 | func (c *CpApiServer) ResetMeasurements(ctx context.Context, empty *emptypb.Empty) (*proto.ActionStatus, error) { |
| 285 | if !c.LeaderElectionServer.IsLeader() { |
no test coverage detected