Documentation ¶
Index ¶
- Variables
- func CheckCommandPath(name string, commandPath string, depth int) error
- func CommandStepHandler(corkDir string, executor *StepsExecutor, stream streamer.StepStream, ...) (map[string]string, error)
- func ContainerStepHandler(corkDir string, executor *StepsExecutor, stream streamer.StepStream, ...) (map[string]string, error)
- func ExportStepHandler(corkDir string, executor *StepsExecutor, stream streamer.StepStream, ...) (map[string]string, error)
- func IsCommandDoesNotExist(err error) bool
- func IsStepDoesNotExist(err error) bool
- func RegisterHandler(handlerName string, handler StepHandler)
- func RegisterRunner(name string, factory StepRunnerFactory)
- type Command
- type CommandDoesNotExist
- type CommandInvalid
- type CommandStepRunner
- type ExecContext
- type ExportStepRunner
- type StdinPiper
- type Step
- type StepDoesNotExist
- type StepHandler
- type StepInvalid
- type StepRunner
- type StepRunnerFactory
- type StepRunnerParams
- type StepRunnersMap
- type StepsExecutor
Constants ¶
This section is empty.
Variables ¶
View Source
var StepHandlers map[string]StepHandler
Functions ¶
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 IsStepDoesNotExist ¶
func RegisterHandler ¶
func RegisterHandler(handlerName string, handler StepHandler)
func RegisterRunner ¶ added in v0.2.0
func RegisterRunner(name string, factory StepRunnerFactory)
Types ¶
type Command ¶
func (*Command) ExecCommand ¶
type CommandDoesNotExist ¶
func (CommandDoesNotExist) Error ¶
func (sdne CommandDoesNotExist) Error() string
type CommandInvalid ¶
func (CommandInvalid) Error ¶
func (si CommandInvalid) Error() string
type CommandStepRunner ¶ added in v0.2.0
type CommandStepRunner struct { Params StepRunnerParams Cmd *exec.Cmd StdinPiper *StdinPiper StepStreamer *streamer.StepStreamer }
func (*CommandStepRunner) HandleInput ¶ added in v0.2.0
func (c *CommandStepRunner) HandleInput(bytes []byte) error
func (*CommandStepRunner) HandleSignal ¶ added in v0.2.0
func (c *CommandStepRunner) HandleSignal(signal int32) error
func (*CommandStepRunner) Initialize ¶ added in v0.2.0
func (c *CommandStepRunner) Initialize(params StepRunnerParams) error
func (*CommandStepRunner) Run ¶ added in v0.2.0
func (c *CommandStepRunner) Run()
type ExecContext ¶ added in v0.2.0
type ExportStepRunner ¶ added in v0.2.0
type ExportStepRunner struct {
Params StepRunnerParams
}
func (*ExportStepRunner) HandleInput ¶ added in v0.2.0
func (e *ExportStepRunner) HandleInput(bytes []byte) error
func (*ExportStepRunner) HandleSignal ¶ added in v0.2.0
func (e *ExportStepRunner) HandleSignal(signal int32) error
func (*ExportStepRunner) Initialize ¶ added in v0.2.0
func (e *ExportStepRunner) Initialize(params StepRunnerParams) error
func (*ExportStepRunner) Run ¶ added in v0.2.0
func (e *ExportStepRunner) Run()
type StdinPiper ¶ added in v0.2.0
func NewStdinPiper ¶ added in v0.2.0
func NewStdinPiper() *StdinPiper
func (*StdinPiper) Kill ¶ added in v0.2.0
func (s *StdinPiper) Kill()
func (*StdinPiper) Write ¶ added in v0.2.0
func (s *StdinPiper) Write(bytes []byte)
type StepDoesNotExist ¶
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 ¶
func (StepInvalid) Error ¶
func (si StepInvalid) Error() string
type StepRunner ¶ added in v0.2.0
type StepRunner interface { Initialize(params StepRunnerParams) error Run() HandleInput(bytes []byte) error HandleSignal(signal int32) error }
func CommandStepRunnerFactory ¶ added in v0.2.0
func CommandStepRunnerFactory(params StepRunnerParams) (StepRunner, error)
func ExportStepRunnerFactory ¶ added in v0.2.0
func ExportStepRunnerFactory(params StepRunnerParams) (StepRunner, error)
type StepRunnerFactory ¶ added in v0.2.0
type StepRunnerFactory func(params StepRunnerParams) (StepRunner, error)
type StepRunnerParams ¶ added in v0.2.0
type StepRunnerParams struct { Context ExecContext Args *definition.StepArgs Stream streamer.StepStream ErrorChan chan error DoneChan chan bool }
type StepRunnersMap ¶ added in v0.2.0
type StepRunnersMap map[string]StepRunnerFactory
var StepRunners StepRunnersMap
func (StepRunnersMap) GetRunner ¶ added in v0.2.0
func (s StepRunnersMap) GetRunner(name string, params StepRunnerParams) (StepRunner, error)
type StepsExecutor ¶
type StepsExecutor struct { Renderer *definition.CorkTemplateRenderer CorkDir string Stream streamer.StepStream Steps []*definition.Step InputChan chan *pb.ExecuteInputEvent InputErrorChan chan error InputWait chan bool }
func NewExecutor ¶
func NewExecutor(corkDir string, renderer *definition.CorkTemplateRenderer, stream streamer.StepStream, steps []*definition.Step) *StepsExecutor
func (*StepsExecutor) AddOutput ¶
func (se *StepsExecutor) AddOutput(stepName string, varName string, value string)
func (*StepsExecutor) Execute ¶ added in v0.2.0
func (se *StepsExecutor) Execute() error
func (*StepsExecutor) ExecuteStep ¶
func (se *StepsExecutor) ExecuteStep(step *definition.Step) error
Click to show internal directories.
Click to hide internal directories.