checker

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Error = errs.Class("checker error")
)

Error is a standard error class for this package.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	Loop sync2.Cycle
	// contains filtered or unexported fields
}

Checker contains the information needed to do checks for missing pieces

func NewChecker

func NewChecker(metainfo *metainfo.Service, repairQueue queue.RepairQueue, overlay *overlay.Cache, irrdb irreparable.DB, limit int, logger *zap.Logger, interval time.Duration) *Checker

NewChecker creates a new instance of checker

func (*Checker) Close

func (checker *Checker) Close() error

Close halts the Checker loop

func (*Checker) IdentifyInjuredSegments

func (checker *Checker) IdentifyInjuredSegments(ctx context.Context) (err error)

IdentifyInjuredSegments checks for missing pieces off of the metainfo and overlay cache

func (*Checker) Run

func (checker *Checker) Run(ctx context.Context) (err error)

Run the checker loop

type Config

type Config struct {
	Interval time.Duration `help:"how frequently checker should audit segments" default:"30s"`
}

Config contains configurable values for checker

Jump to

Keyboard shortcuts

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