Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdPreview ¶
func Preview ¶
func Preview( o *Options, storage states.StateStorage, planResources *models.Spec, project *projectstack.Project, stack *projectstack.Stack, ) (*opsmodels.Changes, error)
The Preview function calculates the upcoming actions of each resource through the execution Kusion Engine, and you can customize the runtime of engine and the state storage through `runtime` and `storage` parameters.
Example:
o := NewPreviewOptions() stateStorage := &states.FileSystemState{ Path: filepath.Join(o.WorkDir, states.KusionState) } kubernetesRuntime, err := runtime.NewKubernetesRuntime() if err != nil { return err } changes, err := Preview(o, kubernetesRuntime, stateStorage, planResources, project, stack, os.Stdout) if err != nil { return err }
Types ¶
type Options ¶ added in v0.9.0
type Options struct { compilecmd.Options Flags backend.BackendOps }
func NewPreviewOptions ¶
func NewPreviewOptions() *Options
func (*Options) AddPreviewFlags ¶ added in v0.9.0
func (*Options) ValidateSpecFile ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.