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

Method ListServices

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

Source from the content-addressed store, hash-verified

140}
141
142func (c *CpApiServer) ListServices(ctx context.Context, empty *emptypb.Empty) (*proto.ServiceList, error) {
143 if !c.LeaderElectionServer.IsLeader() {
144 logrus.Warn("Received ListServices call although not the leader. Forwarding the call...")
145 leader := c.LeaderElectionServer.GetLeader()
146
147 if leader != nil {
148 return leader.ListServices(ctx, empty)
149 } else {
150 return &proto.ServiceList{}, nil
151 }
152 }
153
154 return c.ControlPlane.ListServices(ctx, empty)
155}
156
157func (c *CpApiServer) RegisterNode(ctx context.Context, info *proto.NodeInfo) (*proto.ActionStatus, error) {
158 if !c.LeaderElectionServer.IsLeader() {

Callers

nothing calls this directly

Calls 3

GetLeaderMethod · 0.80
ListServicesMethod · 0.65
IsLeaderMethod · 0.45

Tested by

no test coverage detected