exec

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 4 Imported by: 0

README

Exec plugin

The exec plugin allows you to execute commands.

Important: The exec plugin should be used as a last resort. Using (or writing) a Goplum plugin provides much more control around how the check runs, allows for standardised configuration, avoids the need for external dependencies, and so on.

Checks

exec.command
check exec.command "example" {
  name = "/path/to/script.sh"
  arguments = ["-c", "3", "--verbose"]
}

Executes an arbitrary binary, passing if the exit code is 0, and failing otherwise.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandCheck

type CommandCheck struct {
	Name      string
	Arguments []string
}

func (CommandCheck) Execute

func (c CommandCheck) Execute(ctx context.Context) goplum.Result

func (CommandCheck) Validate

func (c CommandCheck) Validate() error

type Plugin

type Plugin struct{}

func (Plugin) Alert

func (p Plugin) Alert(kind string) goplum.Alert

func (Plugin) Check

func (p Plugin) Check(kind string) goplum.Check

Jump to

Keyboard shortcuts

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