Help us shape the future of Go! Take the 2026 Go Developer Survey

breaks

package
v1.4.32 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConfigErrorReason

func IsConfigErrorReason(reason string) bool

func IsImagePullReason

func IsImagePullReason(reason string) bool

func Priority

func Priority(rule string) int

func Ref

func Ref(record index.Record) kref.Ref

func Root

func Root(record index.Record, byUID map[string]index.Record) kref.Ref

func Rule

func Rule(record index.Record, observed time.Time) string

Types

type Break

type Break struct {
	Root      kref.Ref
	Rule      string
	Severity  string
	Count     int
	Of        int
	Examples  []kref.Ref
	BrokeAt   time.Time
	FirstSeen time.Time
	Source    string
	Evidence  Evidence
}

func Classify

func Classify(records []index.Record, observed time.Time) []Break

type ConditionReason

type ConditionReason struct {
	Type   string `json:"type"`
	Reason string `json:"reason"`
}

type Evidence

type Evidence struct {
	Terminations   []Termination     `json:"terminations,omitempty"`
	Waiting        []WaitingCount    `json:"waiting,omitempty"`
	PodReasons     []ReasonCount     `json:"pod_reasons,omitempty"`
	Nodes          []ReasonCount     `json:"nodes,omitempty"`
	Conditions     []ConditionReason `json:"conditions,omitempty"`
	WarningReasons []ReasonCount     `json:"warning_reasons,omitempty"`
	Warnings       int               `json:"warning_events"`
	Restarts       int               `json:"restarts,omitempty"`
	Partial        bool              `json:"partial,omitempty"`
	From           time.Time         `json:"from"`
	To             time.Time         `json:"to"`
}

type LinkedChange

type LinkedChange struct {
	Change   changes.Change `json:"change"`
	Relation string         `json:"relation"`
	LeadSec  int64          `json:"lead_seconds"`
}

type ReasonCount

type ReasonCount struct {
	Reason string `json:"reason"`
	Count  int    `json:"count"`
}

type Result

type Result struct {
	Changes     []LinkedChange
	MoreChanges int
	History     string
	Gaps        []changes.Gap
	Rebuilt     []string
	Untracked   []string
	Partial     bool
}

func Correlate

func Correlate(item Break, records []index.Record, edges graph.Graph, history changes.Page, partial bool, deniedKinds ...map[string]bool) Result

func CorrelateLoading added in v1.4.32

func CorrelateLoading(item Break, records []index.Record, edges graph.Graph, history changes.Page, partial bool, denied map[string]bool, loading map[string]bool) Result

CorrelateLoading correlates while some kinds are still loading. A reference to a loading kind that is not listed yet is a loading gap, not a coverage failure: it keeps the history from being reported complete without marking the result partial, so real partial causes stay distinguishable.

type Termination

type Termination struct {
	Reason   string    `json:"reason"`
	ExitCode int32     `json:"exit_code"`
	Signal   string    `json:"signal,omitempty"`
	ExitHint string    `json:"exit_hint,omitempty"`
	Count    int       `json:"count"`
	Restarts int       `json:"restarts,omitempty"`
	Init     bool      `json:"init,omitempty"`
	Last     time.Time `json:"last"`
}

type WaitingCount

type WaitingCount struct {
	Reason string `json:"reason"`
	Count  int    `json:"count"`
	Init   bool   `json:"init,omitempty"`
}

Jump to

Keyboard shortcuts

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