(ref name.Reference)
| 247 | } |
| 248 | |
| 249 | func (c *defaultClient) Index(ref name.Reference) (v1.ImageIndex, error) { |
| 250 | if trace.IsEnabled() { |
| 251 | region := trace.StartRegion(c.ctx, "ec:oci-fetch-index") |
| 252 | defer region.End() |
| 253 | trace.Logf(c.ctx, "", "image=%q", ref) |
| 254 | } |
| 255 | |
| 256 | index, err := remote.Index(ref, c.opts...) |
| 257 | if err != nil { |
| 258 | return nil, fmt.Errorf("fetching index: %w", err) |
| 259 | } |
| 260 | |
| 261 | return index, nil |
| 262 | } |