Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrSkip is used as a return value when container execution should be // skipped at runtime. It is not returned as an error by any function. ErrSkip = errors.New("Skipped") // ErrCancel is used as a return value when the container execution receives // a cancellation signal from the context. ErrCancel = errors.New("Cancelled") // ErrInterrupt is used to signal an interrupt and gracefully exit the // runtime execution. ErrInterrupt = errors.New("Interrupt") )
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
type FileSystem interface {
Open(string) (io.ReadCloser, error)
Stat(string) (os.FileInfo, error)
Create(string) (io.WriteCloser, error)
Remove(string) error
}
FileSystem interface defines an abstract file system used by the runtime to snapshot and restore a container file system.
type Hook ¶
type Hook struct {
// Before is called before all all steps are executed.
Before func(*State) error
// BeforeEach is called before each step is executed.
BeforeEach func(*State) error
// After is called after all steps are executed.
After func(*State) error
// AfterEach is called after each step is executed.
AfterEach func(*State) error
// GotFile is called when a file is exported.
GotFile func(*State, *engine.FileInfo, io.ReadCloser) error
// GotLine is called when a line is logged.
GotLine func(*State, *Line) error
// GotLogs is called when the logs are completed.
GotLogs func(*State, []*Line) error
}
Hook provides a set of hooks to run at various stages of runtime execution.
type Line ¶
type Line struct {
Number int `json:"pos,omityempty"`
Message string `json:"out,omitempty"`
Timestemp int64 `json:"time,omitempty"`
}
Line represents a line in the container logs.
type Option ¶
type Option func(*Runtime)
Option configures a Runtime option.
func WithConfig ¶
WithConfig sets the Runtime configuration.
func WithFileSystem ¶
func WithFileSystem(fs FileSystem) Option
WithFileSystem sets the Runtime virtual filesystem.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime executes a pipeline configuration.
type State ¶
type State struct {
// Global state of the runtime.
Runtime struct {
// Runtime time started
Time int64
// Runtime pipeline error state
Error error
}
// Runtime pipeline step
Step *engine.Step
// Current process state.
State *engine.State
// contains filtered or unexported fields
}
State defines the pipeline and process state.
Click to show internal directories.
Click to hide internal directories.