Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdPreview ¶
func Preview ¶
func Preview( o *Options, storage state.Storage, planResources *apiv1.Intent, proj *apiv1.Project, stack *apiv1.Stack, ) (*models.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
func NewPreviewOptions ¶
func NewPreviewOptions() *Options
func (*Options) AddPreviewFlags ¶ added in v0.9.0
func (*Options) ValidateIntentFile ¶ added in v0.9.1
Click to show internal directories.
Click to hide internal directories.