optup

package
v3.48.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 3 Imported by: 47

Documentation

Overview

Package optup contains functional options to be used with stack updates github.com/sdk/v2/go/x/auto Stack.Up(...optup.Option)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option interface {
	ApplyOption(*Options)
}

Option is a parameter to be applied to a Stack.Up() operation

func DebugLogging

func DebugLogging(debugOpts debug.LoggingOptions) Option

DebugLogging provides options for verbose logging to standard error, and enabling plugin logs.

func Diff

func Diff() Option

Diff displays operation as a rich diff showing the overall change

func ErrorProgressStreams added in v3.37.0

func ErrorProgressStreams(writers ...io.Writer) Option

ErrorProgressStreams allows specifying one or more io.Writers to redirect incremental update stderr

func EventStreams

func EventStreams(channels ...chan<- events.EngineEvent) Option

EventStreams allows specifying one or more channels to receive the Pulumi event stream

func ExpectNoChanges

func ExpectNoChanges() Option

ExpectNoChanges will cause the update to return an error if any changes occur

func Message

func Message(message string) Option

Message (optional) to associate with the update operation

func Parallel

func Parallel(n int) Option

Parallel is the number of resource operations to run in parallel at once during the update (1 for no parallelism). Defaults to unbounded. (default 2147483647)

func Plan added in v3.31.0

func Plan(path string) Option

Plan specifies the path to an update plan to use for the update.

func ProgressStreams

func ProgressStreams(writers ...io.Writer) Option

ProgressStreams allows specifying one or more io.Writers to redirect incremental update stdout

func Replace

func Replace(urns []string) Option

Replace specifies an array of resource URNs to explicitly replace during the update

func ShowSecrets added in v3.35.1

func ShowSecrets(show bool) Option

ShowSecrets configures whether to show config secrets when they appear.

func Target

func Target(urns []string) Option

Target specifies an exclusive list of resource URNs to update

func TargetDependents

func TargetDependents() Option

TargetDependents allows updating of dependent targets discovered but not specified in the Target list

func UserAgent added in v3.2.0

func UserAgent(agent string) Option

UserAgent specifies the agent responsible for the update, stored in backends as "environment.exec.agent"

type Options

type Options struct {
	// Parallel is the number of resource operations to run in parallel at once
	// (1 for no parallelism). Defaults to unbounded. (default 2147483647)
	Parallel int
	// Message (optional) to associate with the update operation
	Message string
	// Return an error if any changes occur during this update
	ExpectNoChanges bool
	// Diff displays operation as a rich diff showing the overall change
	Diff bool
	// Specify resources to replace
	Replace []string
	// Specify an exclusive list of resource URNs to update
	Target []string
	// Allows updating of dependent targets discovered but not specified in the Target list
	TargetDependents bool
	// DebugLogOpts specifies additional settings for debug logging
	DebugLogOpts debug.LoggingOptions
	// ProgressStreams allows specifying one or more io.Writers to redirect incremental update stdout
	ProgressStreams []io.Writer
	// ErrorProgressStreams allows specifying one or more io.Writers to redirect incremental update stderr
	ErrorProgressStreams []io.Writer
	// EventStreams allows specifying one or more channels to receive the Pulumi event stream
	EventStreams []chan<- events.EngineEvent
	// UserAgent specifies the agent responsible for the update, stored in backends as "environment.exec.agent"
	UserAgent string
	// Colorize output. Choices are: always, never, raw, auto (default "auto")
	Color string
	// Use the update plan at the given path.
	Plan string
	// Run one or more policy packs as part of this update
	PolicyPacks []string
	// Path to JSON file containing the config for the policy pack of the corresponding "--policy-pack" flag
	PolicyPackConfigs []string
	// Show config secrets when they appear.
	ShowSecrets *bool
}

Options is an implementation detail

Jump to

Keyboard shortcuts

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