completeset

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package completeset manages complete set of blob metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExcludeIncomplete

func ExcludeIncomplete(bms []blob.Metadata) []blob.Metadata

ExcludeIncomplete removes from the provided slice any blobs that are part of incomplete sets.

func FindAll

func FindAll(bms []blob.Metadata) [][]blob.Metadata

FindAll returns a list of complete sets in the provided slice, grouped by set ID. Blobs that are not in any set are also returned.

func FindFirst

func FindFirst(bms []blob.Metadata) []blob.Metadata

FindFirst looks for a first complete set of blobs IDs following a naming convention:

'<any>-s<set>-c<count>'

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 in the set to make it complete.

The algorithm returns IDs of blobs that form the first complete set.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL