MCPcopy Index your code
hub / github.com/perkeep/perkeep / blobserverEnumerator

Function blobserverEnumerator

pkg/server/sync.go:497–508  ·  view source on GitHub ↗
(ctx context.Context, src blobserver.BlobEnumerator)

Source from the content-addressed store, hash-verified

495}
496
497func 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.

Callers 1

newSyncFromConfigFunction · 0.85

Calls 1

EnumerateAllFunction · 0.92

Tested by

no test coverage detected