Receive wraps calling a BlobReceiver's ReceiveBlob method, additionally providing verification of the src digest, and also notifying the blob hub on success. The error will be ErrCorruptBlob if the blobref didn't match.
(ctx context.Context, dst BlobReceiver, br blob.Ref, src io.Reader)
| 41 | // notifying the blob hub on success. |
| 42 | // The error will be ErrCorruptBlob if the blobref didn't match. |
| 43 | func Receive(ctx context.Context, dst BlobReceiver, br blob.Ref, src io.Reader) (blob.SizedRef, error) { |
| 44 | return receive(ctx, dst, br, src, true) |
| 45 | } |
| 46 | |
| 47 | func ReceiveNoHash(ctx context.Context, dst BlobReceiver, br blob.Ref, src io.Reader) (blob.SizedRef, error) { |
| 48 | return receive(ctx, dst, br, src, false) |