local

package
v0.14.1-dev Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const DisableCheckpointBackupsEnvVar = "PULUMI_DISABLE_CHECKPOINT_BACKUPS"

Variables

View Source
var DisableIntegrityChecking bool

DisableIntegrityChecking can be set to true to disable checkpoint state integrity verification. This is not recommended, because it could mean proceeding even in the face of a corrupted checkpoint state file, but can be used as a last resort when a command absolutely must be run.

Functions

func DisplayDiffEvents

func DisplayDiffEvents(action string,
	events <-chan engine.Event, done chan<- bool, opts backend.DisplayOptions)

DisplayDiffEvents displays the engine events with the diff view.

func DisplayEvents

func DisplayEvents(
	action string, events <-chan engine.Event,
	done chan<- bool, opts backend.DisplayOptions)

DisplayEvents reads events from the `events` channel until it is closed, displaying each event as it comes in. Once all events have been read from the channel and displayed, it closes the `done` channel so the caller can await all the events being written.

func DisplayProgressEvents

func DisplayProgressEvents(
	action string, events <-chan engine.Event,
	done chan<- bool, opts backend.DisplayOptions)

DisplayProgressEvents displays the engine events with docker's progress view.

func DisplayProgressToStream

func DisplayProgressToStream(in <-chan Progress, out io.Writer, isTerminal bool)

DisplayProgressToStream displays a Progress stream from `in` to `out`, `isTerminal` describes if `out` is a terminal. If this is the case, it will print `\n` at the end of each line and move the cursor while displaying.

func GetLogsForTarget

func GetLogsForTarget(target *deploy.Target, query operations.LogQuery) ([]operations.LogEntry, error)

GetLogsForTarget fetches stack logs using the config, decrypter, and checkpoint in the given target.

func IsLocalBackendURL

func IsLocalBackendURL(url string) bool

func RenderDiffEvent

func RenderDiffEvent(
	event engine.Event, seen map[resource.URN]engine.StepEventMetadata, opts backend.DisplayOptions) string

Types

type Backend

type Backend interface {
	backend.Backend
	// contains filtered or unexported methods
}

Backend extends the base backend interface with specific information about local backends.

func Login

func Login(d diag.Sink, localURL string) (Backend, error)

func New

func New(d diag.Sink, localURL string) Backend

type DiagInfo

type DiagInfo struct {
	ErrorCount, WarningCount, InfoCount, DebugCount int

	// The last event of each severity kind.  We'll print out the most significant of these next
	// to a resource while it is in progress.
	LastError, LastWarning, LastInfoError, LastInfo, LastDebug *engine.DiagEventPayload

	// All the diagnostic events we've heard about this resource.  We'll print the last diagnostic
	// in the status region while a resource is in progress.  At the end we'll print out all
	// diagnostics for a resource.
	//
	// Diagnostic events are bucketed by their associated stream ID (with 0 being the default
	// stream)
	StreamIDToDiagPayloads map[int32][]engine.DiagEventPayload
}

type Progress

type Progress struct {
	ID      string
	Message string
	Action  string
}

Progress describes a message we want to show in the display. There are two types of messages, simple 'Messages' which just get printed out as a single uninterpreted line, and 'Actions' which are placed and updated in the progress-grid based on their ID. Messages do not need an ID, while Actions must have an ID.

func (*Progress) Display

func (jm *Progress) Display(out io.Writer, termInfo termInfo)

Display displays the Progress to `out`. `termInfo` is non-nil if `out` is a terminal.

type ProgressDisplay

type ProgressDisplay struct {

	// If all progress messages are done and we can print out the final display.
	Done bool
	// contains filtered or unexported fields
}

type ResourceRow

type ResourceRow interface {
	Row

	Step() engine.StepEventMetadata
	SetStep(step engine.StepEventMetadata)

	// The tick we were on when we created this row.  Purely used for generating an
	// ellipses to show progress for in-flight resources.
	Tick() int

	Done() bool
	SetDone()

	SetFailed()

	DiagInfo() *DiagInfo
	RecordDiagEvent(diagEvent engine.Event)
}

type Row

type Row interface {
	DisplayOrderIndex() int
	SetDisplayOrderIndex(index int)

	ColorizedColumns() []string
	ColorizedSuffix() string

	HideRowIfUnnecessary() bool
	SetHideRowIfUnnecessary(value bool)
}

type Stack

type Stack interface {
	backend.Stack
	Path() string // a path to the stack's checkpoint file on disk.
}

Stack is a local stack. This simply adds some local-specific properties atop the standard backend stack interface.

Jump to

Keyboard shortcuts

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