MCPcopy Create free account
hub / github.com/eth-easl/dirigent / ResetMeasurements

Method ResetMeasurements

api/control_plane_api_server.go:284–298  ·  view source on GitHub ↗
(ctx context.Context, empty *emptypb.Empty)

Source from the content-addressed store, hash-verified

282}
283
284func (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
300func (c *CpApiServer) ReportFailure(ctx context.Context, in *proto.Failure) (*proto.ActionStatus, error) {
301 if !c.LeaderElectionServer.IsLeader() {

Callers

nothing calls this directly

Calls 4

GetLeaderMethod · 0.80
ResetTracingServiceMethod · 0.80
ResetMeasurementsMethod · 0.65
IsLeaderMethod · 0.45

Tested by

no test coverage detected