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

Method CheckCluster

module/cluster/impl.go:33–50  ·  view source on GitHub ↗
(ctx context.Context, address ...string)

Source from the content-addressed store, hash-verified

31}
32
33func (m *imlClusterModule) CheckCluster(ctx context.Context, address ...string) ([]*cluster_dto.Node, error) {
34 info, err := admin.Admin(address...).Info(ctx)
35 if err != nil {
36 return nil, err
37 }
38 nodesOut := utils.SliceToSlice(info.Nodes, func(i *admin.Node) *cluster_dto.Node {
39 return &cluster_dto.Node{
40 Id: i.Id,
41 Name: i.Name,
42 Admins: i.Admin,
43 Peers: i.Peer,
44 Gateways: i.Server,
45 }
46 })
47 nodeStatus(ctx, nodesOut)
48
49 return nodesOut, nil
50}
51
52func (m *imlClusterModule) ResetCluster(ctx context.Context, clusterId string, address string) ([]*cluster_dto.Node, error) {
53

Callers

nothing calls this directly

Calls 3

AdminFunction · 0.92
nodeStatusFunction · 0.85
InfoMethod · 0.65

Tested by

no test coverage detected