Documentation ¶
Index ¶
- Constants
- Variables
- func CommandInspect(appName string) error
- func CommandRebuild(appName string, allApps bool, parallelCount int) error
- func CommandReport(appName string, format string, infoFlag string) error
- func CommandRestart(appName string, processName string, allApps bool, parallelCount int) error
- func CommandRestore(appName string, allApps bool, parallelCount int) error
- func CommandRetire(appName string) error
- func CommandScale(appName string, skipDeploy bool, processTuples []string) error
- func CommandSet(appName string, property string, value string) error
- func CommandStart(appName string, allApps bool, parallelCount int) error
- func CommandStop(appName string, allApps bool, parallelCount int) error
- func Rebuild(appName string) error
- func ReportSingleApp(appName string, format string, infoFlag string) error
- func Restart(appName string) error
- func RestartProcess(appName string, processName string) error
- func Restore(appName string) error
- func Start(appName string) error
- func Stop(appName string) error
- func TriggerAppRestart(appName string) error
- func TriggerCorePostDeploy(appName string) error
- func TriggerCorePostExtract(appName string, sourceWorkDir string) error
- func TriggerInstall() error
- func TriggerPostAppClone(oldAppName string, newAppName string) error
- func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error
- func TriggerPostAppRename(oldAppName string, newAppName string) error
- func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error
- func TriggerPostCreate(appName string) error
- func TriggerPostDelete(appName string) error
- func TriggerPostReleaseBuilder(builderType string, appName string, image string) error
- func TriggerPostStop(appName string) error
- func TriggerProcfileExists(appName string) error
- func TriggerProcfileGetCommand(appName string, processType string, port int) error
- func TriggerPsCanScale(appName string, canScale bool) error
- func TriggerPsCurrentScale(appName string) error
- func TriggerPsSetScale(appName string, skipDeploy bool, clearExisting bool, processTuples []string) error
- type Formation
- type FormationSlice
- type RetireLockFailed
Constants ¶
const RunInSerial = 0
RunInSerial is the default value for whether to run a command in parallel or not and defaults to -1 (false)
Variables ¶
var ( // DefaultProperties is a map of all valid ps properties with corresponding default property values DefaultProperties = map[string]string{ "restart-policy": "on-failure:10", "procfile-path": "", } // GlobalProperties is a map of all valid global ps properties GlobalProperties = map[string]bool{ "procfile-path": true, } )
Functions ¶
func CommandInspect ¶
CommandInspect displays a sanitized version of docker inspect for an app
func CommandRebuild ¶
CommandRebuild rebuilds an app from source
func CommandReport ¶
CommandReport displays a ps report for one or more apps
func CommandRestart ¶
CommandRestart restarts an app
func CommandRestore ¶
CommandRestore starts previously running apps e.g. after reboot
func CommandRetire ¶
CommandRetire ensures old containers are retired
func CommandScale ¶
CommandScale gets or sets how many instances of a given process to run
func CommandSet ¶
CommandSet sets or clears a ps property for an app
func CommandStart ¶
CommandStart starts an app
func CommandStop ¶
CommandStop stops an app
func ReportSingleApp ¶
ReportSingleApp is an internal function that displays the ps report for one or more apps
func RestartProcess ¶
RestartProcess restarts a process type within an app
func TriggerAppRestart ¶
TriggerAppRestart restarts an app
func TriggerCorePostDeploy ¶
TriggerCorePostDeploy sets a property to allow the app to be restored on boot
func TriggerCorePostExtract ¶
TriggerCorePostExtract ensures that the main Procfile is the one specified by procfile-path
func TriggerPostAppClone ¶
TriggerPostAppClone rebuilds the new app
func TriggerPostAppCloneSetup ¶
TriggerPostAppCloneSetup creates new ps files
func TriggerPostAppRename ¶
TriggerPostAppRename rebuilds the renamed app
func TriggerPostAppRenameSetup ¶
TriggerPostAppRenameSetup renames ps files
func TriggerPostCreate ¶
TriggerPostCreate ensures apps have a default restart policy and scale value for web
func TriggerPostDelete ¶
TriggerPostDelete destroys the ps properties for a given app container
func TriggerPostReleaseBuilder ¶
TriggerPostReleaseBuilder ensures an app has an up to date scale parameters
func TriggerPostStop ¶
TriggerPostStop sets the restore property to false
func TriggerProcfileExists ¶
TriggerProcfileExists checks if a procfile exists
func TriggerProcfileGetCommand ¶
TriggerProcfileGetCommand fetches a command from the procfile
func TriggerPsCanScale ¶
TriggerPsCanScale sets whether or not a user can scale an app with ps:scale
func TriggerPsCurrentScale ¶
TriggerPsCurrentScale prints out the current scale contents (process-type=quantity) delimited by newlines
Types ¶
type FormationSlice ¶
type FormationSlice []*Formation
FormationSlice contains a slice of Formations that can be sorted
func (FormationSlice) Len ¶
func (d FormationSlice) Len() int
func (FormationSlice) Less ¶
func (d FormationSlice) Less(i, j int) bool
func (FormationSlice) Swap ¶
func (d FormationSlice) Swap(i, j int)
type RetireLockFailed ¶
type RetireLockFailed struct {
Err *error
}
RetireLockFailed wraps error to distinguish between a normal error and an error where the retire lock could not be fetched
func (*RetireLockFailed) Error ¶
func (err *RetireLockFailed) Error() string
Error returns a standard non-existent app error
func (*RetireLockFailed) ExitCode ¶
func (err *RetireLockFailed) ExitCode() int
ExitCode returns an exit code to use in case this error bubbles up into an os.Exit() call