plugin

package
v1.15.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 13 Imported by: 0

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

View Source
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.

View Source
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

func Load(dir string, enabled func(string) bool, record func(key, kind, version string) error) int

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL