PutArtifact sends artifact to remote client
(ctx context.Context, imageID string, artifactInfo types.ArtifactInfo)
| 46 | |
| 47 | // PutArtifact sends artifact to remote client |
| 48 | func (c RemoteCache) PutArtifact(ctx context.Context, imageID string, artifactInfo types.ArtifactInfo) error { |
| 49 | _, err := rpc.Retry(ctx, func() (*emptypb.Empty, error) { |
| 50 | return c.client.PutArtifact(c.ctx, rpc.ConvertToRPCArtifactInfo(imageID, artifactInfo)) |
| 51 | }) |
| 52 | if err != nil { |
| 53 | return xerrors.Errorf("unable to store cache on the server: %w", err) |
| 54 | } |
| 55 | return nil |
| 56 | } |
| 57 | |
| 58 | // PutBlob sends blobInfo to remote client |
| 59 | func (c RemoteCache) PutBlob(ctx context.Context, diffID string, blobInfo types.BlobInfo) error { |