loader

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadOptions

type LoadOptions struct {
	RawSpecs []string
	RawSpec  string
}

type TroubleshootKinds

type TroubleshootKinds struct {
	AnalyzersV1Beta2        []troubleshootv1beta2.Analyzer
	CollectorsV1Beta2       []troubleshootv1beta2.Collector
	HostCollectorsV1Beta2   []troubleshootv1beta2.HostCollector
	HostPreflightsV1Beta2   []troubleshootv1beta2.HostPreflight
	PreflightsV1Beta2       []troubleshootv1beta2.Preflight
	RedactorsV1Beta2        []troubleshootv1beta2.Redactor
	RemoteCollectorsV1Beta2 []troubleshootv1beta2.RemoteCollector
	SupportBundlesV1Beta2   []troubleshootv1beta2.SupportBundle
}

func LoadSpecs

func LoadSpecs(ctx context.Context, opt LoadOptions) (*TroubleshootKinds, error)

LoadSpecs takes sources to load specs from and returns a TroubleshootKinds object that contains all the parsed troubleshoot specs.

The fetched specs need to be yaml documents. The documents can be a multidoc yaml separated by "---" which get split and parsed one at a time. This function will return an error if any of the documents are not valid yaml. If Secrets or ConfigMaps are found, they will be parsed and the support bundle, redactor or preflight spec will be extracted from them, else they will be ignored. Any other yaml documents will be ignored.

func NewTroubleshootKinds

func NewTroubleshootKinds() *TroubleshootKinds

func (*TroubleshootKinds) IsEmpty

func (kinds *TroubleshootKinds) IsEmpty() bool

Jump to

Keyboard shortcuts

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