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

noderesults

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SucceededNodesConfigMapKey is the binaryData key whose value is a
	// gzip-compressed comma-separated list of nodes that passed.
	SucceededNodesConfigMapKey = "succeeded-nodes.csv.gz"

	// FailedNodesConfigMapKey is the binaryData key whose value is a
	// gzip-compressed JSON array of {name, reason, message} objects.
	FailedNodesConfigMapKey = "failed-nodes.json.gz"
)

Variables

This section is empty.

Functions

func DecodeFailedNodesFromConfigMap

func DecodeFailedNodesFromConfigMap(cm *corev1.ConfigMap) ([]nvcrev1alpha1.FailedNode, error)

DecodeFailedNodesFromConfigMap parses the failed-nodes entry (a JSON array of {name, reason, message} objects) from a node-results ConfigMap's binaryData.

func FailedNodeNames

func FailedNodeNames(nodes []nvcrev1alpha1.FailedNode) []string

FailedNodeNames extracts the sorted, deduped node names from FailedNode entries.

func FailedNodesFromJSON

func FailedNodesFromJSON(b []byte) ([]nvcrev1alpha1.FailedNode, error)

FailedNodesFromJSON parses the JSON array produced by FailedNodesToJSON back into FailedNode entries.

func FailedNodesToJSON

func FailedNodesToJSON(nodes []nvcrev1alpha1.FailedNode) ([]byte, error)

FailedNodesToJSON encodes FailedNode entries as a JSON array of {name, reason, message} objects.

func NodesWithFailureDetails

func NodesWithFailureDetails(names []string, reason nvcrev1alpha1.NodeFailureReason,
	message string) []nvcrev1alpha1.FailedNode

NodesWithFailureDetails wraps a list of node names into FailedNode entries with the given reason and message. The result is sorted by node name.

Every node receives the same message. That is correct when the evidence is group-scoped (a collective failed, and the run knows only that it failed), and it is the shape every caller but the node-health detector needs. A caller that holds genuine per-node evidence should use NodesWithPerNodeDetails instead rather than fanning one message across nodes it does not describe.

func NodesWithPerNodeDetails added in v0.8.0

func NodesWithPerNodeDetails(names []string, reason nvcrev1alpha1.NodeFailureReason,
	msgFor func(string) string) []nvcrev1alpha1.FailedNode

NodesWithPerNodeDetails wraps a list of node names into FailedNode entries with the given reason, calling msgFor to build each node's own message. The result is sorted by node name.

FailedNodes is a list-map keyed on (name, reason), so a node carries at most one message per reason; a caller producing two messages for the same pair keeps whichever the merge order lands on.

Types

This section is empty.

Jump to

Keyboard shortcuts

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