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)
| 20 | // |
| 21 | // The algorithm returns IDs of blobs that form the first complete set. |
| 22 | func 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. |
| 32 | func ExcludeIncomplete(bms []blob.Metadata) []blob.Metadata { |