Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultDoneDir = "/tmp/zora/results" DoneDirEnvVar = "DONE_DIR" PluginEnvVar = "PLUGIN_NAME" ClusterEnvVar = "CLUSTER_NAME" ClusterIssuesNsEnvVar = "CLUSTER_ISSUES_NAMESPACE" JobEnvVar = "JOB_NAME" JobUIDEnvVar = "JOB_UID" )
Variables ¶
View Source
var PluginParsers = map[string]func(logr.Logger, []byte) ([]*zorav1a1.ClusterIssueSpec, error){ "popeye": popeye.Parse, "marvin": marvin.Parse, }
PluginParsers correlates plugins with their respective parsing functions.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DonePath string ErrorPath string Plugin string Cluster string ClusterIssuesNs string Job string JobUID string }
Config stores information used by the worker to create a list of <ClusterIssue> instances, and to specify the "done" file path.
func FromEnv ¶
FromEnv instantiates a new <Config> struct, with values taken from the environment. It'll return an error in case cluster related variables aren't found.
func New ¶
func New() *Config
New instantiates a new <Config> struct, with the default path for the "done" file.
func (*Config) HandleDonePath ¶
HandleDonePath ensures the directory wherefrom the "done" file will be written exists.
func (*Config) HandleResultsPath ¶
HandleResultsPath returns an <io.Reader> pointing to the path inside the "done" file.
Click to show internal directories.
Click to hide internal directories.