scrub

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	// Create stores a new pending scrub-repair job.
	Create(ctx context.Context, s Scrub) error

	// First returns the next pending scrub-repair job.
	First(ctx context.Context) (*Scrub, error)

	// Delete removes a processed scrub-repair job.
	Delete(ctx context.Context, s *Scrub) error
}

Repository defines the operations for the pending scrub-repair queue.

type Scrub

type Scrub struct {
	// ScrubID is the unique BoltDB key assigned on creation.
	ScrubID []byte

	// Key is the file key to repair on this volume.
	Key string

	// Signature is the expected SHA1 of the file content.
	Signature string

	// VolumeIDs is the list of remote volume IDs that hold a known-good copy.
	// The local volume ID has already been filtered out.
	VolumeIDs []string
}

Scrub holds a pending checksum-repair job. When a volume detects that a local file's SHA1 no longer matches its stored signature, a Scrub is created so the background loop can fetch a good copy from one of the listed remote volumes.

Jump to

Keyboard shortcuts

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