Documentation ¶
Overview ¶
Package worker is responsible for the logic behind submitting results data back to a Sonobuoy aggregator. This is intended for plugins to leverage, to avoid uploading data manually.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoRequest ¶
func DoRequest(url string, client *http.Client, callback func() (io.Reader, string, string, error)) error
DoRequest calls the given callback which returns an io.Reader, and submits the results, with error handling, and falls back on uploading JSON with the error message if the callback fails. (This way, problems gathering data don't result in the server waiting forever for results that will never come.)
func GatherResults ¶
GatherResults is the consumer of a co-scheduled container that agrees on the following contract:
1. Output data will be placed into an agreed upon results directory. 2. The Job will wait for a done file 3. The done file contains a single string of the results to be sent to the aggregator
func LoadConfig ¶
func LoadConfig() (*plugin.WorkerConfig, error)
LoadConfig loads the configuration for the sonobuoy worker from environment variables, returning a plugin.WorkerConfig struct with defaults applied
Types ¶
This section is empty.