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

Method ReconstructState

api/control_plane_api_server.go:274–282  ·  view source on GitHub ↗
(ctx context.Context, config config2.ControlPlaneConfig)

Source from the content-addressed store, hash-verified

272}
273
274func (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
284func (c *CpApiServer) ResetMeasurements(ctx context.Context, empty *emptypb.Empty) (*proto.ActionStatus, error) {
285 if !c.LeaderElectionServer.IsLeader() {

Callers 1

Calls 1

IsLeaderMethod · 0.45

Tested by

no test coverage detected