checker

package
v0.0.0-...-adad84f Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: BSD-2-Clause-Patent Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMorePasses = errors.New("no more passes")
	ErrPassFindings = errors.New("pass has findings that must be addressed")
)
View Source
var (
	FaultCheckerNotEnabled = checkerFault(
		code.SystemCheckerNotEnabled,
		"system checker is not enabled",
		"enable the system checker and try again",
	)
	FaultCheckerEnabled = checkerFault(
		code.SystemCheckerEnabled,
		"system checker is enabled; normal operations are disabled",
		"disable the system checker to enable normal operations",
	)
)

Functions

func FaultIncorrectMemberStates

func FaultIncorrectMemberStates(stopRequired bool, members, expectedStates string) *fault.Fault

func GetActionMsg

func GetActionMsg(class chkpb.CheckInconsistClass, action chkpb.CheckInconsistAction, details ...string) string

GetActionMsg attempts to generate a human-readable description of the action that may be taken for the given finding.

func IsIncorrectMemberStates

func IsIncorrectMemberStates(err error) bool

func IsPassFindings

func IsPassFindings(err error) bool

Types

type Finding

type Finding struct {
	chkpb.CheckReport
}

func AnnotateFinding

func AnnotateFinding(f *Finding) *Finding

AnnotateFinding updates human-readable action messages.

func MockFinding

func MockFinding(idx ...int) *Finding

func NewFinding

func NewFinding(report *chkpb.CheckReport) *Finding

func (*Finding) HasChoice

func (f *Finding) HasChoice(action chkpb.CheckInconsistAction) bool

func (*Finding) ValidChoicesString

func (f *Finding) ValidChoicesString() string

type FindingStore

type FindingStore interface {
	AddCheckerFinding(finding *Finding) error
	UpdateCheckerFinding(finding *Finding) error
	AddOrUpdateCheckerFinding(finding *Finding) error
	GetCheckerFindings(seqs ...uint64) ([]*Finding, error)
	GetCheckerFinding(seq uint64) (*Finding, error)
	SetCheckerFindingAction(seq uint64, action int32) error
}

Jump to

Keyboard shortcuts

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