exec

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 4 Imported by: 0

README

= Exec plugin
:toc: macro

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

[source,goplum]
----
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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳