state

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutputInfo

type OutputInfo struct {
	Name string

	Sensitive bool
	Type      string
	ValueStr  gojson.RawMessage
	Action    json.ChangeAction
}

type OutputInfos

type OutputInfos []*OutputInfo

func (OutputInfos) ToColumns

func (infos OutputInfos) ToColumns(width int) []table.Column

func (OutputInfos) ToRows

func (infos OutputInfos) ToRows() []table.Row

type ResourceInfo

type ResourceInfo struct {
	Idx             int
	RawResourceAddr json.ResourceAddr
	Loc             ResourceInfoLocator
	Status          ResourceStatus
	StartTime       time.Time
	EndTime         time.Time
}

func (ResourceInfo) Duration

func (info ResourceInfo) Duration(now time.Time) time.Duration

type ResourceInfoLocator

type ResourceInfoLocator struct {
	Module       string
	ResourceAddr string
	Action       string
}

type ResourceInfoUpdate

type ResourceInfoUpdate struct {
	Status  *ResourceStatus
	Endtime *time.Time
}

type ResourceInfos

type ResourceInfos []*ResourceInfo

ResourceInfos records the operation information for each resource's action.

func (ResourceInfos) Find

func (ResourceInfos) ToColumns

func (infos ResourceInfos) ToColumns(width int) []table.Column

func (ResourceInfos) ToCsv

func (infos ResourceInfos) ToCsv(stage string) []string

func (ResourceInfos) ToRows

func (infos ResourceInfos) ToRows(total int) []table.Row

ToRows turns the ResourceInfos into table rows. The total is used to decorate the index as a fraction, if total > 0.

func (ResourceInfos) Update

type ResourceStatus

type ResourceStatus string
const (
	// Once received one OperationStart hook message
	ResourceStatusStart ResourceStatus = "start"
	// Once received one OperationComplete hook message
	ResourceStatusComplete ResourceStatus = "complete"
	// Once received one OperationErrored hook message
	ResourceStatusErrored ResourceStatus = "error"
)

Jump to

Keyboard shortcuts

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