stack

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Events

func Events(ctx context.Context, action string) chan<- events.EngineEvent

func GetResourceIdByURNMap

func GetResourceIdByURNMap(rawOutputs auto.OutputMap) (map[string]string, error)

func GetStackOutputs

func GetStackOutputs(rawOutputs auto.OutputMap) (map[string]any, error)

func InstallDependencies

func InstallDependencies(ctx context.Context, stackDirectory string) error

func RunDown

func RunDown(ctx context.Context, fs afero.Fs, stackReference Reference) error

func RunPreview

func RunPreview(ctx context.Context, fs afero.Fs, stackReference Reference) (*auto.PreviewResult, error)

func UpdateConstructStateFromUpResult

func UpdateConstructStateFromUpResult(sm *model.StateManager, stackReference Reference, summary *auto.UpResult) error

Types

type NpmProgress

type NpmProgress struct {
	Progress tui.Progress
	// contains filtered or unexported fields
}

func (*NpmProgress) Write

func (p *NpmProgress) Write(b []byte) (n int, err error)

Write parses npm's stdout and stderr to drive setting the progress. It uses loglevel silly output and string parsing, so it's not very robust.

type PulumiProgress

type PulumiProgress struct {
	Progress tui.Progress
	// contains filtered or unexported fields
}

func (*PulumiProgress) Write

func (p *PulumiProgress) Write(b []byte) (n int, err error)

type Reference

type Reference struct {
	ConstructURN model.URN
	Name         string
	IacDirectory string
	AwsRegion    string
}

type StackInterface

type StackInterface interface {
	Export(ctx context.Context) (apitype.UntypedDeployment, error)
	Up(ctx context.Context, opts ...optup.Option) (auto.UpResult, error)
	Preview(ctx context.Context, opts ...optpreview.Option) (auto.PreviewResult, error)
	Destroy(ctx context.Context, opts ...optdestroy.Option) (auto.DestroyResult, error)
	SetConfig(ctx context.Context, key string, value auto.ConfigValue) error
	Workspace() auto.Workspace
	Outputs(ctx context.Context) (auto.OutputMap, error)
}

func Initialize

func Initialize(ctx context.Context, fs afero.Fs, projectName string, stackName string, stackDirectory string) (StackInterface, error)

type State

type State struct {
	Version    int
	Deployment apitype.DeploymentV3
	Outputs    map[string]any
	Resources  map[construct.ResourceId]apitype.ResourceV3
}

func GetState

func GetState(ctx context.Context, stack StackInterface) (State, error)

GetState retrieves the state of a stack

func RunUp

func RunUp(ctx context.Context, fs afero.Fs, stackReference Reference) (*auto.UpResult, *State, error)

type StateManager

type StateManager struct {
	ConstructStackState map[model.URN]State
}

func NewStateManager

func NewStateManager() *StateManager

func (*StateManager) GetResourceState

func (sm *StateManager) GetResourceState(urn model.URN, id construct.ResourceId) (apitype.ResourceV3, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL