common

package
v0.1.4-pre Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeExec

func MakeExec(t *v2alpha1.TaskSpec) (base.Task, error)

MakeExec converts an exec task spec into an exec task.

func MakeTask

func MakeTask(t *v2alpha1.TaskSpec) (base.Task, error)

MakeTask constructs a Task from a TaskSpec or returns an error if any.

Types

type ExecInputs

type ExecInputs struct {
	Cmd  string        `json:"cmd" yaml:"cmd"`
	Args []interface{} `json:"args,omitempty" yaml:"args,omitempty"`
}

ExecInputs contain the name and arguments of the command to be executed.

type ExecTask

type ExecTask struct {
	Library string     `json:"library" yaml:"library"`
	Task    string     `json:"task" yaml:"task"`
	With    ExecInputs `json:"with" yaml:"with"`
}

ExecTask encapsulates a command that can be executed.

func (*ExecTask) Run

func (t *ExecTask) Run(ctx context.Context) error

Run the command.

Jump to

Keyboard shortcuts

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