MissingBlobs fetches missing blobs from RemoteCache
(ctx context.Context, imageID string, layerIDs []string)
| 68 | |
| 69 | // MissingBlobs fetches missing blobs from RemoteCache |
| 70 | func (c RemoteCache) MissingBlobs(ctx context.Context, imageID string, layerIDs []string) (bool, []string, error) { |
| 71 | layers, err := rpc.Retry(ctx, func() (*rpcCache.MissingBlobsResponse, error) { |
| 72 | return c.client.MissingBlobs(c.ctx, rpc.ConvertToMissingBlobsRequest(imageID, layerIDs)) |
| 73 | }) |
| 74 | if err != nil { |
| 75 | return false, nil, xerrors.Errorf("unable to fetch missing layers: %w", err) |
| 76 | } |
| 77 | return layers.MissingArtifact, layers.MissingBlobIds, nil |
| 78 | } |
| 79 | |
| 80 | // DeleteBlobs removes blobs by IDs from RemoteCache |
| 81 | func (c RemoteCache) DeleteBlobs(ctx context.Context, blobIDs []string) error { |