Documentation
¶
Index ¶
- type ExecutionState
- type Executor
- type Runner
- type StateManager
- func (sm *StateManager) AddInstalledTool(name, version string) error
- func (sm *StateManager) IsStepCompleted(stepID string) bool
- func (sm *StateManager) Load() (*ExecutionState, error)
- func (sm *StateManager) MarkStepCompleted(stepID string) error
- func (sm *StateManager) Reset() error
- func (sm *StateManager) Save(state *ExecutionState) error
- func (sm *StateManager) SetCurrentStep(stepID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionState ¶
type ExecutionState struct {
SetupName string `json:"setup_name"`
SetupVersion string `json:"setup_version"`
Platform string `json:"platform"`
StartedAt time.Time `json:"started_at"`
UpdatedAt time.Time `json:"updated_at"`
CompletedSteps []string `json:"completed_steps"`
CurrentStep string `json:"current_step"`
FailedFiles []string `json:"failed_files"`
InstalledTools map[string]string `json:"installed_tools"`
}
ExecutionState represents the current state of an execution
type Executor ¶
type Executor interface {
Name() string
Execute(ctx context.Context, file executors.ExecutionFile) (*executors.ExecutionResult, error)
Validate(config map[string]interface{}) error
}
Executor defines the interface for all executors
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner manages the execution of an execution plan
func NewRunner ¶
func NewRunner(plan *config.ExecutionPlan, stateFile string) (*Runner, error)
NewRunner creates a new runner
func (*Runner) RegisterExecutor ¶
RegisterExecutor registers a custom executor
func (*Runner) SetProgressCallback ¶ added in v0.1.1
SetProgressCallback sets a callback function for progress notifications
func (*Runner) State ¶ added in v0.1.1
func (r *Runner) State() *ExecutionState
State returns the current execution state
type StateManager ¶
type StateManager struct {
// contains filtered or unexported fields
}
StateManager manages the execution state
func NewStateManager ¶
func NewStateManager(filePath string) (*StateManager, error)
NewStateManager creates a new state manager
func (*StateManager) AddInstalledTool ¶
func (sm *StateManager) AddInstalledTool(name, version string) error
AddInstalledTool records an installed tool and its version
func (*StateManager) IsStepCompleted ¶
func (sm *StateManager) IsStepCompleted(stepID string) bool
IsStepCompleted checks if a step has been completed
func (*StateManager) Load ¶
func (sm *StateManager) Load() (*ExecutionState, error)
Load loads the state from file
func (*StateManager) MarkStepCompleted ¶
func (sm *StateManager) MarkStepCompleted(stepID string) error
MarkStepCompleted marks a step as completed
func (*StateManager) Save ¶
func (sm *StateManager) Save(state *ExecutionState) error
Save saves the state to file
func (*StateManager) SetCurrentStep ¶
func (sm *StateManager) SetCurrentStep(stepID string) error
SetCurrentStep sets the current step being executed