Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker runs various checks on a repository. It is advisable to create an exclusive Lock in the repository before running any checks.
A Checker only tests for internal errors within the data structures of the repository (e.g. missing blobs), and needs a valid Repository to work on.
func New ¶
func New(repo *repository.Repository) *Checker
New returns a new checker which runs on repo.
func (*Checker) OrphanedPacks ¶
OrphanedPacks returns a slice of unused packs (only available after Packs() was run).
func (*Checker) Packs ¶
Packs checks that all packs referenced in the index are still available and there are no packs that aren't in an index. errChan is closed after all packs have been checked.
func (*Checker) Structure ¶
Structure checks that for all snapshots all referenced data blobs and subtrees are available in the index. errChan is closed after all trees have been traversed.
func (*Checker) UnusedBlobs ¶
UnusedBlobs returns all blobs that have never been referenced.