Documentation ¶
Index ¶
Constants ¶
const ( SonobuoyResultsDirKey = "SONOBUOY_RESULTS_DIR" DoneFileName = "done" DefaultTarballName = "results.tar.gz" )
const (
SonobuoyProgressPortEnvKey = "SONOBUOY_PROGRESS_PORT"
)
Variables ¶
This section is empty.
Functions ¶
func Done ¶
func Done() error
Done will tar up the results directory, write the done file which instructs Sonobuoy to submit results to the aggregator.
func GetResultsDir ¶
func GetResultsDir() string
Types ¶
type ProgressReporter ¶
type ProgressReporter struct {
// contains filtered or unexported fields
}
func NewProgressReporter ¶
func NewProgressReporter(total int64) ProgressReporter
NewProgressReporter will initialize a progress reporter which expects the given number of tests. If it fails to generate a reporter, it will return the empty reporter which executes noops.
func (*ProgressReporter) SendMessage ¶
func (r *ProgressReporter) SendMessage(msg string) error
SendMessage should be used for sending arbitrary messages. This method waits for a response, use SendMessageAsync for an asynchronous call.
func (*ProgressReporter) SendMessageAsync ¶
func (r *ProgressReporter) SendMessageAsync(msg string)
func (*ProgressReporter) StartTest ¶
func (r *ProgressReporter) StartTest(name string)
StartTest will send a progress update indicating the start of the given test.
type SonobuoyResultsWriter ¶
SonobuoyResultsWriter will keep track of result items in memory and will write them to the .ResultsDir/.OutputFile. If the ResultsDir is empty, the data will be dumped to stdout instead.
func NewDefaultSonobuoyResultsWriter ¶
func NewDefaultSonobuoyResultsWriter() SonobuoyResultsWriter
func NewSonobuoyResultsWriter ¶
func NewSonobuoyResultsWriter(resultsDir, outputFile string) SonobuoyResultsWriter
func (*SonobuoyResultsWriter) AddTest ¶
func (w *SonobuoyResultsWriter) AddTest( testName string, result string, err error, output string, )
func (*SonobuoyResultsWriter) Done ¶
func (w *SonobuoyResultsWriter) Done(writeDoneFile bool) error