(ctx context.Context, empty *emptypb.Empty)
| 282 | } |
| 283 | |
| 284 | func (c *CpApiServer) ResetMeasurements(ctx context.Context, empty *emptypb.Empty) (*proto.ActionStatus, error) { |
| 285 | if !c.LeaderElectionServer.IsLeader() { |
| 286 | leader := c.LeaderElectionServer.GetLeader() |
| 287 | |
| 288 | if leader != nil { |
| 289 | logrus.Warn("Received ResetMeasurements call although not the leader. Forwarding the call...") |
| 290 | return leader.ResetMeasurements(ctx, empty) |
| 291 | } else { |
| 292 | return &proto.ActionStatus{Success: false}, nil |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | c.ControlPlane.ColdStartTracing.ResetTracingService() |
| 297 | return &proto.ActionStatus{Success: true}, nil |
| 298 | } |
| 299 | |
| 300 | func (c *CpApiServer) ReportFailure(ctx context.Context, in *proto.Failure) (*proto.ActionStatus, error) { |
| 301 | if !c.LeaderElectionServer.IsLeader() { |
nothing calls this directly
no test coverage detected