MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / ClusterNodes

Method ClusterNodes

module/cluster/impl.go:91–109  ·  view source on GitHub ↗
(ctx context.Context, clusterId string)

Source from the content-addressed store, hash-verified

89 return gateway.InitGateway(ctx, clusterId, client)
90}
91func (m *imlClusterModule) ClusterNodes(ctx context.Context, clusterId string) ([]*cluster_dto.Node, error) {
92
93 nodes, err := m.clusterService.Nodes(ctx)
94 if err != nil {
95 return nil, err
96 }
97 nodesOut := utils.SliceToSlice(nodes, func(i *cluster.Node) *cluster_dto.Node {
98 return &cluster_dto.Node{
99 Id: i.Uuid,
100 Name: i.Name,
101 Admins: i.Admin,
102 Peers: i.Peer,
103 Gateways: i.Server,
104 }
105 })
106 nodeStatus(ctx, nodesOut)
107
108 return nodesOut, nil
109}
110
111//
112//func (m *imlClusterModule) CreatePartition(ctx context.Context, create *paritiondto.Create) (*paritiondto.Detail, error) {

Callers

nothing calls this directly

Calls 2

nodeStatusFunction · 0.85
NodesMethod · 0.65

Tested by

no test coverage detected