(ctx context.Context)
| 159 | } |
| 160 | |
| 161 | func (i *image) RootFS(ctx context.Context) ([]digest.Digest, error) { |
| 162 | i.mu.Lock() |
| 163 | defer i.mu.Unlock() |
| 164 | if i.diffIDs != nil { |
| 165 | return i.diffIDs, nil |
| 166 | } |
| 167 | |
| 168 | provider := i.client.ContentStore() |
| 169 | diffIDs, err := i.i.RootFS(ctx, provider, i.platform) |
| 170 | if err != nil { |
| 171 | return nil, err |
| 172 | } |
| 173 | i.diffIDs = diffIDs |
| 174 | return diffIDs, nil |
| 175 | } |
| 176 | |
| 177 | func (i *image) Size(ctx context.Context) (int64, error) { |
| 178 | return usage.CalculateImageUsage(ctx, i.i, i.client.ContentStore(), usage.WithManifestLimit(i.platform, 1), usage.WithManifestUsage()) |
no test coverage detected