Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResumeExecution ¶
func ResumeExecution(types *ActionConfig, cp Checkpointer, maxCpuIntensiveTasks int, checkpointInterval time.Duration) error
Types ¶
type Action ¶
type Action struct { Type ActionType JsonAction JsonAction }
type ActionConfig ¶
type ActionConfig struct {
ActionTypes map[ActionTypeName]ActionType
}
func NewActionConfig ¶
func NewActionConfig(types ...ActionType) (*ActionConfig, error)
type ActionType ¶
type ActionType interface { TypeName() ActionTypeName EmptyJsonAction() JsonAction IsCpuIntensive() bool }
type ActionTypeName ¶
type ActionTypeName string
type Checkpoint ¶
type Checkpoint struct {
Actions []*CheckpointedAction
}
type CheckpointedAction ¶
type CheckpointedAction struct { ActionType ActionTypeName JsonAction string Completed bool }
type Checkpointer ¶
type Dependency ¶
type Dependency struct { ActionTypeName ActionTypeName ActionKey ActionKey }
type Execution ¶
type Execution struct {
// contains filtered or unexported fields
}
func NewExecution ¶
func NewExecution(types *ActionConfig, cp Checkpointer, maxCpuIntensiveTasks int, checkpointInterval time.Duration) (*Execution, error)
func (*Execution) AddAction ¶
func (e *Execution) AddAction(typeName ActionTypeName, jsonAction JsonAction) error
type JsonAction ¶
type JsonAction interface { Dependencies() []Dependency ActionKey() ActionKey Execute() error }
Click to show internal directories.
Click to hide internal directories.