Documentation ¶
Overview ¶
Package v7pushaction contains the business logic for orchestrating a V2 app push.
Index ¶
- Constants
- type Actor
- func (actor Actor) Actualize(state PushState, progressBar ProgressBar) (<-chan PushState, <-chan Event, <-chan Warnings, <-chan error)
- func (actor Actor) ApplyManifest(state PushState, warningsStream chan Warnings, eventStream chan Event) error
- func (actor Actor) Conceptualize(appName string, spaceGUID string, orgGUID string, currentDir string, ...) ([]PushState, Warnings, error)
- func (actor Actor) CreateAndMapDefaultApplicationRoute(orgGUID string, spaceGUID string, app v7action.Application) (Warnings, error)
- func (actor Actor) CreateAndUploadApplicationBits(state PushState, progressBar ProgressBar, warningsStream chan Warnings, ...) (v7action.Package, error)
- func (actor Actor) CreateOrUpdateApplication(state PushState, warningsStream chan Warnings, eventStream chan Event) (PushState, error)
- func (actor Actor) CreatePackage(state PushState, progressBar ProgressBar, warningsStream chan Warnings, ...) (v7action.Package, error)
- func (actor Actor) DefaultDomain(orgGUID string) (v2action.Domain, Warnings, error)
- func (actor Actor) GetArchivePath(state PushState) (string, error)
- func (actor Actor) ScaleProcess(state PushState, warningsStream chan Warnings, eventStream chan Event) error
- func (actor Actor) UpdateProcess(state PushState, warningsStream chan Warnings, eventStream chan Event) error
- type Application
- type Event
- type FlagOverrides
- type ProgressBar
- type PushState
- type SharedActor
- type V2Actor
- type V7Actor
- type Warnings
Constants ¶
View Source
const ProtocolRegexp = "^https?://|^tcp://"
View Source
const PushRetries = 3
View Source
const URLRegexp = "^(?:https?://|tcp://)?(?:(?:[\\w-]+\\.)|(?:[*]\\.))+\\w+(?:\\:\\d+)?(?:/.*)*(?:\\.\\w+)?$"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
Actor handles all business logic for Cloud Controller v2 operations.
func NewActor ¶
func NewActor(v2Actor V2Actor, v3Actor V7Actor, sharedActor SharedActor) *Actor
NewActor returns a new actor.
func (Actor) ApplyManifest ¶
func (Actor) Conceptualize ¶
func (Actor) CreateAndMapDefaultApplicationRoute ¶
func (Actor) CreateAndUploadApplicationBits ¶
func (Actor) CreateOrUpdateApplication ¶
func (Actor) CreatePackage ¶
func (Actor) DefaultDomain ¶
DefaultDomain looks up the shared and then private domains and returns back the first one in the list as the default.
func (Actor) ScaleProcess ¶
type Application ¶
type Application struct { v2action.Application Buildpacks []string Stack v2action.Stack }
func (Application) CalculatedBuildpacks ¶
func (app Application) CalculatedBuildpacks() []string
CalculatedBuildpacks will return back the buildpacks for the application.
func (*Application) SetStack ¶
func (app *Application) SetStack(stack v2action.Stack)
func (Application) String ¶
func (app Application) String() string
type Event ¶
type Event string
const ( ApplyManifest Event = "Applying manifest" ApplyManifestComplete Event = "Applying manifest Complete" BoundRoutes Event = "bound routes" BoundServices Event = "bound services" ConfiguringServices Event = "configuring services" CreatedApplication Event = "created application" CreatedRoutes Event = "created routes" CreatingAndMappingRoutes Event = "creating and mapping routes" CreatingApplication Event = "creating application" CreatingArchive Event = "creating archive" CreatingPackage Event = "creating package" PollingBuild Event = "polling build" ReadingArchive Event = "reading archive" ResourceMatching Event = "resource matching" RetryUpload Event = "retry upload" ScaleWebProcess Event = "scaling the web process" ScaleWebProcessComplete Event = "scaling the web process complete" SetDockerImage Event = "setting docker properties" SetDockerImageComplete Event = "completed setting docker properties" SetDropletComplete Event = "set droplet complete" SetProcessConfiguration Event = "setting configuration on the process" SetProcessConfigurationComplete Event = "completed setting configuration on the process" SettingDroplet Event = "setting droplet" SettingUpApplication Event = "setting up application" SkippingApplicationCreation Event = "skipping creation" StagingComplete Event = "staging complete" StartingStaging Event = "starting staging" StoppingApplication Event = "stopping application" StoppingApplicationComplete Event = "stopping application complete" UnmappingRoutes Event = "unmapping routes" UpdatedApplication Event = "updated application" UploadDropletComplete Event = "upload droplet complete" UploadingApplication Event = "uploading application" UploadingApplicationWithArchive Event = "uploading application with archive" UploadingDroplet Event = "uploading droplet" UploadWithArchiveComplete Event = "upload complete" Complete Event = "complete" )
type FlagOverrides ¶
type FlagOverrides struct { Buildpacks []string DockerImage string DockerPassword string DockerUsername string HealthCheckType constant.HealthCheckType Instances types.NullInt Memory types.NullUint64 ProvidedAppPath string SkipRouteCreation bool StartCommand types.FilteredString NoStart bool }
type ProgressBar ¶
type PushState ¶
type PushState struct { Application v7action.Application SpaceGUID string OrgGUID string Overrides FlagOverrides Manifest []byte Archive bool BitsPath string AllResources []sharedaction.Resource MatchedResources []sharedaction.Resource UnmatchedResources []sharedaction.Resource }
type SharedActor ¶
type SharedActor interface {}
type V2Actor ¶
type V2Actor interface { MapRouteToApplication(routeGUID string, appGUID string) (v2action.Warnings, error) CreateRoute(route v2action.Route, generatePort bool) (v2action.Route, v2action.Warnings, error) FindRouteBoundToSpaceWithSettings(route v2action.Route) (v2action.Route, v2action.Warnings, error) GetApplicationRoutes(applicationGUID string) (v2action.Routes, v2action.Warnings, error) GetOrganizationDomains(orgGUID string) ([]v2action.Domain, v2action.Warnings, error) }
type V7Actor ¶
type V7Actor interface { CreateApplicationInSpace(app v7action.Application, spaceGUID string) (v7action.Application, v7action.Warnings, error) CreateBitsPackageByApplication(appGUID string) (v7action.Package, v7action.Warnings, error) CreateDockerPackageByApplication(appGUID string, dockerImageCredentials v7action.DockerImageCredentials) (v7action.Package, v7action.Warnings, error) GetApplicationByNameAndSpace(appName string, spaceGUID string) (v7action.Application, v7action.Warnings, error) PollBuild(buildGUID string, appName string) (v7action.Droplet, v7action.Warnings, error) PollPackage(pkg v7action.Package) (v7action.Package, v7action.Warnings, error) ScaleProcessByApplication(appGUID string, process v7action.Process) (v7action.Warnings, error) SetApplicationDroplet(appGUID string, dropletGUID string) (v7action.Warnings, error) SetApplicationManifest(appGUID string, rawManifest []byte) (v7action.Warnings, error) StageApplicationPackage(pkgGUID string) (v7action.Build, v7action.Warnings, error) StopApplication(appGUID string) (v7action.Warnings, error) UpdateApplication(app v7action.Application) (v7action.Application, v7action.Warnings, error) UpdateProcessByTypeAndApplication(processType string, appGUID string, updatedProcess v7action.Process) (v7action.Warnings, error) UploadBitsPackage(v7action.Package, []sharedaction.Resource, io.Reader, int64) (v7action.Package, v7action.Warnings, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.