MCPcopy Index your code
hub / github.com/kopia/kopia / inspectAllBlobs

Method inspectAllBlobs

cli/command_index_inspect.go:76–105  ·  view source on GitHub ↗
(ctx context.Context, rep repo.DirectRepository, includeInactive bool, output chan indexBlobPlusContentInfo)

Source from the content-addressed store, hash-verified

74}
75
76func (c *commandIndexInspect) inspectAllBlobs(ctx context.Context, rep repo.DirectRepository, includeInactive bool, output chan indexBlobPlusContentInfo) error {
77 indexes, err := rep.IndexBlobs(ctx, includeInactive)
78 if err != nil {
79 return errors.Wrap(err, "error listing index blobs")
80 }
81
82 indexesCh := make(chan indexblob.Metadata, len(indexes))
83 for _, bm := range indexes {
84 indexesCh <- bm
85 }
86
87 close(indexesCh)
88
89 var eg errgroup.Group
90
91 for range c.parallel {
92 eg.Go(func() error {
93 for bm := range indexesCh {
94 if err := c.inspectSingleIndexBlob(ctx, rep, bm.BlobID, output); err != nil {
95 return err
96 }
97 }
98
99 return nil
100 })
101 }
102
103 //nolint:wrapcheck
104 return eg.Wait()
105}
106
107func (c *commandIndexInspect) dumpIndexBlobEntries(entries chan indexBlobPlusContentInfo) {
108 for ent := range entries {

Callers 1

runWithOutputMethod · 0.95

Calls 3

IndexBlobsMethod · 0.65
WaitMethod · 0.65

Tested by

no test coverage detected