(ctx context.Context, src blobserver.BlobEnumerator)
| 495 | } |
| 496 | |
| 497 | func blobserverEnumerator(ctx context.Context, src blobserver.BlobEnumerator) func(chan<- blob.SizedRef, <-chan struct{}) error { |
| 498 | return func(dst chan<- blob.SizedRef, intr <-chan struct{}) error { |
| 499 | return blobserver.EnumerateAll(ctx, src, func(sb blob.SizedRef) error { |
| 500 | select { |
| 501 | case dst <- sb: |
| 502 | case <-intr: |
| 503 | return errors.New("interrupted") |
| 504 | } |
| 505 | return nil |
| 506 | }) |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | // enumeratePendingBlobs yields blobs from the in-memory pending list (needCopy). |
| 511 | // This differs from enumerateQueuedBlobs, which pulls in the on-disk sorted.KeyValue store. |
no test coverage detected