MCPcopy
hub / github.com/kopia/kopia / FindFirst

Function FindFirst

internal/completeset/complete_set.go:22–29  ·  view source on GitHub ↗

FindFirst looks for a first complete set of blobs IDs following a naming convention: ' -s -c ' where: 'prefix' is arbitrary string not containing a dash ('-') 'set' is a random string shared by all indexes in the same set 'count' is a number that specifies how many items must be

(bms []blob.Metadata)

Source from the content-addressed store, hash-verified

20//
21// The algorithm returns IDs of blobs that form the first complete set.
22func FindFirst(bms []blob.Metadata) []blob.Metadata {
23 sets := FindAll(bms)
24 if len(sets) == 0 {
25 return nil
26 }
27
28 return sets[0]
29}
30
31// ExcludeIncomplete removes from the provided slice any blobs that are part of incomplete sets.
32func ExcludeIncomplete(bms []blob.Metadata) []blob.Metadata {

Callers 3

loadRangeCheckpointsMethod · 0.92
TestFindFirstAndAllFunction · 0.92

Calls 1

FindAllFunction · 0.85

Tested by 1

TestFindFirstAndAllFunction · 0.74