Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
Action Action `json:"action"`
Resource types.Resource `json:"resource"`
Diff *types.ResourceDiff `json:"diff,omitempty"`
Error error `json:"error,omitempty"`
}
Change represents a planned change to a resource
type ChangeResult ¶
type ChangeResult struct {
Change Change `json:"change"`
Success bool `json:"success"`
Error error `json:"error,omitempty"`
Duration time.Duration `json:"duration"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
}
ChangeResult represents the result of executing a single change
type ExecuteOptions ¶
type ExecuteOptions struct {
DryRun bool `json:"dry_run"`
Parallel bool `json:"parallel"`
FailFast bool `json:"fail_fast"`
MaxRetries int `json:"max_retries"`
}
ExecuteWithOptions executes a plan with additional options
type ExecutionResult ¶
type ExecutionResult struct {
Changes []ChangeResult `json:"changes"`
Summary ExecutionSummary `json:"summary"`
}
ExecutionResult represents the result of executing a plan
func NewExecutionResult ¶
func NewExecutionResult() *ExecutionResult
NewExecutionResult creates a new execution result
func (*ExecutionResult) AddChangeResult ¶
func (er *ExecutionResult) AddChangeResult(result ChangeResult)
AddChangeResult adds a change result and updates the summary
func (*ExecutionResult) Finalize ¶
func (er *ExecutionResult) Finalize()
Finalize finalizes the execution result by setting end time and duration
type ExecutionSummary ¶
type ExecutionSummary struct {
Total int `json:"total"`
Succeeded int `json:"succeeded"`
Failed int `json:"failed"`
Duration time.Duration `json:"duration"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
}
ExecutionSummary provides a summary of execution results
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor executes plans by applying changes
func NewExecutor ¶
func NewExecutor(registry *types.ProviderRegistry) *Executor
NewExecutor creates a new executor with the given provider registry
func (*Executor) ExecutePlan ¶
ExecutePlan executes all changes in a plan
func (*Executor) ExecutePlanWithOptions ¶
func (e *Executor) ExecutePlanWithOptions(ctx context.Context, plan *Plan, options ExecuteOptions) (*ExecutionResult, error)
ExecutePlanWithOptions executes a plan with the given options
type Module ¶
type Module struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Metadata ModuleMetadata `yaml:"metadata"`
Spec ModuleSpec `yaml:"spec"`
}
Module represents a Chisel configuration module
func LoadModuleFromFile ¶
LoadModuleFromFile loads a module from a YAML file
func (*Module) SaveToFile ¶
SaveModuleToFile saves a module to a YAML file
type ModuleMetadata ¶
type ModuleMetadata struct {
Name string `yaml:"name"`
Version string `yaml:"version"`
Description string `yaml:"description,omitempty"`
Labels map[string]string `yaml:"labels,omitempty"`
}
ModuleMetadata contains metadata about the module
type ModuleSpec ¶
ModuleSpec contains the module specification
type Plan ¶
type Plan struct {
Changes []Change `json:"changes"`
}
Plan represents a collection of planned changes
func (*Plan) HasChanges ¶
HasChanges returns true if the plan has any changes that need to be applied
type PlanSummary ¶
type PlanSummary struct {
ToCreate int `json:"to_create"`
ToUpdate int `json:"to_update"`
ToDelete int `json:"to_delete"`
NoChanges int `json:"no_changes"`
Errors int `json:"errors"`
}
PlanSummary provides a summary of planned changes
type Planner ¶
type Planner struct {
// contains filtered or unexported fields
}
Planner creates execution plans for modules
func NewPlanner ¶
func NewPlanner(registry *types.ProviderRegistry) *Planner
NewPlanner creates a new planner with the given provider registry