Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseExecutor ¶
type BaseExecutor struct {
// contains filtered or unexported fields
}
BaseExecutor provides common functionality for bootstrap and unbootstrap operations
func NewBaseExecutor ¶
func NewBaseExecutor(cfg *config.Config, logger *logrus.Logger) *BaseExecutor
NewBaseExecutor creates a new base executor
func (*BaseExecutor) ExecuteSteps ¶
func (be *BaseExecutor) ExecuteSteps(ctx context.Context, steps []Executor, stepType string) (*ExecutionResult, error)
ExecuteSteps executes a list of steps and returns results
type Bootstrapper ¶
type Bootstrapper struct {
*BaseExecutor
// contains filtered or unexported fields
}
Bootstrapper executes bootstrap steps sequentially
func New ¶
func New( cfg *config.Config, logger *logrus.Logger, componentsAPIConn *grpc.ClientConn, ) *Bootstrapper
New creates a new bootstrapper
func (*Bootstrapper) Bootstrap ¶
func (b *Bootstrapper) Bootstrap(ctx context.Context) (*ExecutionResult, error)
Bootstrap executes all bootstrap steps sequentially
func (*Bootstrapper) Unbootstrap ¶
func (b *Bootstrapper) Unbootstrap(ctx context.Context) (*ExecutionResult, error)
Unbootstrap executes all cleanup steps sequentially (in reverse order of bootstrap)
type ExecutionResult ¶
type ExecutionResult struct {
Success bool `json:"success"`
StepCount int `json:"step_count"`
Duration time.Duration `json:"duration"`
StepResults []StepResult `json:"step_results"`
Error string `json:"error,omitempty"`
}
ExecutionResult represents the result of bootstrap or unbootstrap process
type Executor ¶
type Executor interface {
// Execute performs the step's main operation
Execute(ctx context.Context) error
// IsCompleted checks if the step has already been completed
IsCompleted(ctx context.Context) bool
// GetName returns the step name
GetName() string
}
executor is a common base interface for all executors Every installer and uninstaller implements this interface
Click to show internal directories.
Click to hide internal directories.