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

Method Versions

gateway/apinto/dynamic.go:50–68  ·  view source on GitHub ↗
(ctx context.Context, matchLabels map[string]string)

Source from the content-addressed store, hash-verified

48}
49
50func (d *DynamicClient) Versions(ctx context.Context, matchLabels map[string]string) (map[string]string, error) {
51 workers, err := d.client.MatchLabels(ctx, d.profession, matchLabels)
52 if err != nil {
53 if errors.Is(err, proto.Nil) {
54 return nil, nil
55 }
56 return nil, err
57 }
58 versions := make(map[string]string)
59 for _, worker := range workers {
60 var item entity.BasicInfo
61 err = worker.Scan(encoding.Json[entity.BasicInfo](&item))
62 if err != nil {
63 return nil, err
64 }
65 versions[item.Name] = item.Version
66 }
67 return versions, nil
68}
69
70func (d *DynamicClient) Online(ctx context.Context, resources ...*gateway.DynamicRelease) error {
71 err := d.client.Begin(ctx)

Callers

nothing calls this directly

Calls 1

ScanMethod · 0.45

Tested by

no test coverage detected