pusher

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pusher handles pushing to individual Cloud Foundry instances.

Index

Constants

View Source
const TemporaryNameSuffix = "-new-build-"

TemporaryNameSuffix is used when deploying the new application in order to not overide the existing application name.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudFoundryGetLogsError added in v0.6.0

type CloudFoundryGetLogsError struct {
	CfTaskErr error
	CfLogErr  error
}

func (CloudFoundryGetLogsError) Error added in v0.6.0

func (e CloudFoundryGetLogsError) Error() string

type DeleteApplicationError added in v0.6.0

type DeleteApplicationError struct {
	ApplicationName string
	Out             []byte
}

func (DeleteApplicationError) Error added in v0.6.0

func (e DeleteApplicationError) Error() string

type LoginError added in v0.6.0

type LoginError struct {
	FoundationURL string
	Out           []byte
}

func (LoginError) Error added in v0.6.0

func (e LoginError) Error() string

type MapRouteError added in v0.6.0

type MapRouteError struct {
	Out []byte
}

func (MapRouteError) Error added in v0.6.0

func (e MapRouteError) Error() string

type PushError added in v0.6.0

type PushError struct{}

func (PushError) Error added in v0.6.0

func (e PushError) Error() string

type Pusher

type Pusher struct {
	Courier        I.Courier
	DeploymentInfo S.DeploymentInfo
	EventManager   I.EventManager
	Response       io.ReadWriter
	Log            I.Logger
	// contains filtered or unexported fields
}

Pusher has a courier used to push applications to Cloud Foundry. It represents logging into a single foundation to perform operations.

func (Pusher) CleanUp

func (p Pusher) CleanUp() error

CleanUp removes the temporary directory created by the Executor.

func (*Pusher) Exists

func (p *Pusher) Exists(appName string)

Exists uses the courier to check if the application already exists, meaning this is not the first time it has been pushed to Cloud Foundry.

func (Pusher) FinishPush

func (p Pusher) FinishPush() error

FinishPush will delete the original application if it existed. It will always rename the the newly pushed application to the appName.

func (Pusher) Login

func (p Pusher) Login(foundationURL string) error

Login will login to a Cloud Foundry instance.

func (Pusher) Push

func (p Pusher) Push(appPath, foundationURL string) error

Push pushes a single application to a Clound Foundry instance using blue green deployment. Blue green is done by pushing a new application with the appName+TemporaryNameSuffix+UUID. It pushes the new application with the existing appName route. It will map a load balanced domain if provided in the config.yml.

Returns Cloud Foundry logs if there is an error.

func (Pusher) UndoPush added in v0.6.0

func (p Pusher) UndoPush() error

UndoPush is only called when a Push fails. If it is not the first deployment, UndoPush will delete the temporary application that was pushed. If is the first deployment, UndoPush will rename the failed push to have the appName.

type RenameError added in v0.6.0

type RenameError struct {
	ApplicationName string
	Out             []byte
}

func (RenameError) Error added in v0.6.0

func (e RenameError) Error() string

type UnmapRouteError added in v0.7.0

type UnmapRouteError struct {
	ApplicationName string
	Out             []byte
}

func (UnmapRouteError) Error added in v0.7.0

func (e UnmapRouteError) Error() string

Directories

Path Synopsis
Package courier interfaces with the Executor to run specific Cloud Foundry CLI commands.
Package courier interfaces with the Executor to run specific Cloud Foundry CLI commands.
executor
Package executor runs commands against the Cloud Foundry binary.
Package executor runs commands against the Cloud Foundry binary.

Jump to

Keyboard shortcuts

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