Documentation
¶
Overview ¶
Package plugin is the host side of job plugins: a kind=job binary under plugins/jobs/<key>/ is registered like a built-in job (Jobs page, cron, Run now, run history). Each Run spawns the binary, calls the gRPC Job.Run once, and kills the process when the stream ends — nothing stays resident between runs.
Index ¶
Constants ¶
const DefaultTimeout = 30 * time.Minute
DefaultTimeout bounds one plugin run; WICK_JOB_PLUGIN_TIMEOUT (a Go duration) overrides it. The process is killed when it elapses.
const TriggerScheduled = "cron"
TriggerScheduled is the trigger sent to the plugin. The scheduler does not tell a cron run from Run now yet, so every run is reported the same way.
Variables ¶
This section is empty.
Functions ¶
func BuildModule ¶
func BuildModule(f connplugin.Found) job.Module
BuildModule turns one discovered kind=job plugin into a job.Module whose Run spawns the binary for exactly one call.
func KillAll ¶
func KillAll()
KillAll kills every job plugin process still running (wick shutdown or the end of a reload drain). The interrupted runs fail like a timeout.
func Load ¶
Load registers every enabled, verified kind=job plugin under dir with the jobs registry and returns how many were registered. Call it before job.ValidateJobs / configs bootstrap so the plugin's config rows are seeded like a built-in job's. record (optional) is told the kind + version of each registered plugin (PluginState bookkeeping).
Types ¶
This section is empty.