executor

package
v0.0.0-...-009dd65 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StepHandlers map[string]StepHandler

Functions

func CheckCommandPath

func CheckCommandPath(name string, commandPath string, depth int) error

func CommandStepHandler

func CommandStepHandler(corkDir string, executor *StepsExecutor, stream streamer.StepStream, step *definition.Step) (map[string]string, error)

CommandStepHandler - Handles executing a command step

func ContainerStepHandler

func ContainerStepHandler(corkDir string, executor *StepsExecutor, stream streamer.StepStream, step *definition.Step) (map[string]string, error)

ContainerStepHandler - Handles executing a command step

func ExportStepHandler

func ExportStepHandler(corkDir string, executor *StepsExecutor, stream streamer.StepStream, step *definition.Step) (map[string]string, error)

ExportStepHandler - Handles exporting variables from a stage execution

func IsCommandDoesNotExist

func IsCommandDoesNotExist(err error) bool

func IsStepDoesNotExist

func IsStepDoesNotExist(err error) bool

func RegisterHandler

func RegisterHandler(handlerName string, handler StepHandler)

Types

type Command

type Command struct {
	Name string
	Path string
}

func LoadCommand

func LoadCommand(corkDir string, name string) (*Command, error)

func (*Command) ExecCommand

func (s *Command) ExecCommand() *exec.Cmd

type CommandDoesNotExist

type CommandDoesNotExist struct {
	Name    string
	Message string
}

func (CommandDoesNotExist) Error

func (sdne CommandDoesNotExist) Error() string

type CommandInvalid

type CommandInvalid struct {
	Name    string
	Message string
}

func (CommandInvalid) Error

func (si CommandInvalid) Error() string

type Step

type Step struct {
	Name string
	Path string
}

func Load

func Load(name string) (*Step, error)

func (*Step) Command

func (s *Step) Command() *exec.Cmd

type StepDoesNotExist

type StepDoesNotExist struct {
	Name    string
	Message string
}

func (StepDoesNotExist) Error

func (sdne StepDoesNotExist) Error() string

type StepHandler

type StepHandler func(corkDir string, executor *StepsExecutor, stream streamer.StepStream, step *definition.Step) (map[string]string, error)

StepHandler - Handles steps

type StepInvalid

type StepInvalid struct {
	Name    string
	Message string
}

func (StepInvalid) Error

func (si StepInvalid) Error() string

type StepsExecutor

type StepsExecutor struct {
	Renderer *definition.CorkTemplateRenderer
	CorkDir  string
	Stream   streamer.StepStream
}

func NewExecutor

func NewExecutor(corkDir string, renderer *definition.CorkTemplateRenderer, stream streamer.StepStream) *StepsExecutor

func (*StepsExecutor) AddOutput

func (se *StepsExecutor) AddOutput(stepName string, varName string, value string)

func (*StepsExecutor) ExecuteStep

func (se *StepsExecutor) ExecuteStep(step *definition.Step) error

Jump to

Keyboard shortcuts

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