fsck

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(ctx context.Context, origin string, verifier note.Verifier, f Fetcher, N uint, bundleHasher func([]byte) ([][]byte, error)) error

Check performs an integrity check against a log via the provided fetcher, using the provided bundleHasher to parse and convert entries from the log's entry bundles into leaf hashes.

The leaf hashes are used to: 1. re-construct the root hash of the log, and compare it against the value in the log's checkpoint 2. re-construct the internal tiles of the log, and compare them against the log's tile resources.

The checking will use the provided N parameter to control the number of concurrent workers undertaking this process.

Types

type Fetcher

type Fetcher interface {
	ReadCheckpoint(ctx context.Context) ([]byte, error)
	ReadTile(ctx context.Context, l, i uint64, p uint8) ([]byte, error)
	ReadEntryBundle(ctx context.Context, i uint64, p uint8) ([]byte, error)
}

Fetcher describes a struct which knows how to retrieve tlog-tiles artifacts from a log.

Jump to

Keyboard shortcuts

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