arbitrary
(ctx context.Context, blobs []blob.Ref, fn func(blob.SizedRef) error)
| 444 | var statGate = syncutil.NewGate(20) // arbitrary |
| 445 | |
| 446 | func (s *storage) StatBlobs(ctx context.Context, blobs []blob.Ref, fn func(blob.SizedRef) error) error { |
| 447 | return blobserver.StatBlobsParallelHelper(ctx, blobs, fn, statGate, func(br blob.Ref) (sb blob.SizedRef, err error) { |
| 448 | m, err := s.meta(br) |
| 449 | if err == nil { |
| 450 | return m.SizedRef(br), nil |
| 451 | } |
| 452 | if errors.Is(err, os.ErrNotExist) { |
| 453 | return sb, nil |
| 454 | } |
| 455 | return sb, err |
| 456 | }) |
| 457 | } |
| 458 | |
| 459 | func (s *storage) EnumerateBlobs(ctx context.Context, dest chan<- blob.SizedRef, after string, limit int) (err error) { |
| 460 | defer close(dest) |
nothing calls this directly
no test coverage detected