changer

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttemptingToChangeStackMsg        = "Attempting to change stack to %s for %s...\n\n"
	ChangeStackSuccessMsg             = "Application %s was successfully changed to Stack %s"
	AppStackAssociationError          = "application is already associated with stack %s"
	V3ZDTCCAPIMinimum                 = "2.131.0" // This is cc-api version from capi-release v1.76.0, which ships with PAS 2.5
	RestoringStateMsg                 = "Restoring prior application state: %s"
	ErrorChangingStack                = "problem assigning target stack to %s"
	ErrorStaging                      = "problem staging new droplet on %s"
	ErrorSettingDroplet               = "problem setting droplet on %s"
	ErrorRestartingApp                = "problem restarting app on %s"
	ErrorRetrievingAPIVersion         = "problem retrieving cf api version"
	ErrorCheckingZDTSupport           = "problem checking for ZDT support"
	ErrorRecoveringFromStaging        = "Problem recovering from staging error"
	ErrorRecoveringFromRestart        = "Problem recovering from restart error"
	ErrorRecoveringFromSettingDroplet = "Problem recovering from setting the droplet error"
	ErrorZDTNotSupported              = "Your CAPI version does not support a zero downtime restart. Please remove --v3 flag and try again"
	RestagingMsg                      = "Restaging on existing stack: %s\n"
)

Variables

This section is empty.

Functions

func IsZDTSupported added in v0.0.4

func IsZDTSupported(version string) (bool, error)

Types

type Changer

type Changer struct {
	CF     cf.CF
	Runner Runner
	Log    func(writer io.Writer, msg string)
	V3Flag bool
}

func (*Changer) ChangeStack

func (c *Changer) ChangeStack(appName, newStack string) (string, error)

func (*Changer) GetAPIVersion added in v0.0.4

func (c *Changer) GetAPIVersion() (string, error)

type RequestData added in v0.0.2

type RequestData struct {
	LifeCycle struct {
		Data struct {
			Stack string `json:"stack"`
		} `json:"data"`
	} `json:"lifecycle"`
}

type Runner added in v0.0.4

type Runner interface {
	Run(bin, dir string, quiet bool, args ...string) error
	RunWithOutput(bin, dir string, quiet bool, args ...string) (string, error)
	SetEnv(variableName string, path string) error
}

Jump to

Keyboard shortcuts

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