execer

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package execer provides a trigger type that executes an external program.

Index

Constants

This section is empty.

Variables

View Source
var ExecerSpec = conf.SectionSpec{
	{
		Name:        "Command",
		Type:        conf.StringSliceType,
		Description: "The command to execute.",
		Aliases:     []string{"Run"},
		Required:    true,
	},
	{
		Name:        "Stdin",
		Type:        conf.StringType,
		Description: "The format to pass the event on stdin. Possible values are 'json', 'yaml', 'no' (default) or 'close'.",
		Default:     "no",
	},
	{
		Name:        "CommandTemplates",
		Type:        conf.BoolType,
		Default:     "true",
		Description: "Whether or not the commands are interpolated using text/template.",
	},
	{
		Name:        "MaxProcTime",
		Type:        conf.DurationType,
		Default:     "1m",
		Description: "Maximum time a Command= is allowed to run before it will be killed.",
	},
}

Functions

func AddTriggerType

func AddTriggerType(reg *trigger.Registry) error

Types

type Execer

type Execer struct {
	Command          []string
	Stdin            string
	CommandTemplates bool
	MaxProcTime      time.Duration
}

func (*Execer) Run

func (e *Execer) Run(ctx context.Context, payload interface{}) error

Jump to

Keyboard shortcuts

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