MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / GatewayClient

Method GatewayClient

service/cluster/cluster.go:45–57  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

43}
44
45func (s *imlClusterService) GatewayClient(ctx context.Context, id string) (gateway.IClientDriver, error) {
46 nodes, err := s.Nodes(ctx, id)
47 if err != nil {
48 return nil, err
49 }
50 address := make([]string, 0, len(nodes))
51 for _, n := range nodes {
52 address = append(address, n.Admin...)
53 }
54 return gateway.GetClient("apinto", &gateway.ClientConfig{
55 Addresses: address,
56 })
57}
58
59func (s *imlClusterService) ListByClusters(ctx context.Context, ids ...string) ([]*Cluster, error) {
60 wm := make(map[string]interface{})

Callers

nothing calls this directly

Calls 2

NodesMethod · 0.95
GetClientFunction · 0.92

Tested by

no test coverage detected