Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CheckStartMsg string = "starting" CheckWriteMsg string = "writing-result" CheckCompleteMsg string = "complete" )
Functions ¶
func IsSonobouyPod ¶
Types ¶
type Check ¶
type Check interface {
AddtoRunner(*Runner)
}
Check is a configured check ready to be added to a runner.
type CheckConfig ¶
type CheckConfig struct { Name string `yaml:"name"` Description string `yaml:"description"` Kind string `yaml:"kind"` Spec map[string]string `yaml:"spec"` }
CheckConfig defines a Check.
type Config ¶
type Config struct {
Cfg ReliabilityConfig `env:"CONFIG"`
}
Config is used to read config back in at runtime.
type Item ¶
type Item struct { Name string `yaml:"name"` Status string `yaml:"status"` Details map[string]interface{} `yaml:"details"` }
Item defines an Item within a ReportItem
type Querier ¶
type Querier interface {
Start(*QuerierConfig)
}
Querier is a gather of information that can be ran by the Runner.
type QuerierConfig ¶
type QuerierConfig struct { Context context.Context Results chan ReportItem Logger *log.Logger Complete chan struct{} }
QuerierConfig provides generic configuration options for a Querier
type ReliabilityConfig ¶
type ReliabilityConfig struct {
Checks []CheckConfig `yaml:"checks"`
}
ReliabilityConfig defines an overall configuration for the Reliability Scanner.
type Report ¶
type Report struct { Name string `yaml:"name"` Status string `yaml:"status"` Meta struct { Type string `yaml:"type"` } `yaml:"meta"` Items []ReportItem }
Report is the overall output of the program to be returned to Sonobuoy
type ReportItem ¶
type ReportItem struct { Name string `yaml:"name"` Status string `yaml:"status"` Meta struct { File string `yaml:"file"` Type string `yaml:"type"` } `yaml:"meta"` Items []Item `yaml:"items"` }
ReportItem defines a set of Items
type Runner ¶
type Runner struct { Config *ReliabilityConfig Context context.Context Queriers []Querier Results chan ReportItem Complete chan struct{} Logger *log.Logger }
Runner runs the included Queriers, based on the configured Checks provided.
func (*Runner) BuildReport ¶
BuildReport given data returns a Report ready for writing
Click to show internal directories.
Click to hide internal directories.