(ctx context.Context, resourceId string)
| 32 | } |
| 33 | |
| 34 | func (d *DynamicClient) Version(ctx context.Context, resourceId string) (string, error) { |
| 35 | worker, err := d.client.Get(ctx, genWorkerID(resourceId, d.profession)) |
| 36 | if err != nil { |
| 37 | return "", err |
| 38 | } |
| 39 | if len(worker) == 0 { |
| 40 | return "", nil |
| 41 | } |
| 42 | var item entity.BasicInfo |
| 43 | err = worker.Scan(encoding.Json[entity.BasicInfo](&item)) |
| 44 | if err != nil { |
| 45 | return "", err |
| 46 | } |
| 47 | return item.Version, nil |
| 48 | } |
| 49 | |
| 50 | func (d *DynamicClient) Versions(ctx context.Context, matchLabels map[string]string) (map[string]string, error) { |
| 51 | workers, err := d.client.MatchLabels(ctx, d.profession, matchLabels) |
nothing calls this directly
no test coverage detected