Documentation ¶
Overview ¶
Package pushaction contains the business logic for orchestrating a V2 app push.
Index ¶
- Constants
- type Actor
- func (actor Actor) Apply(config ApplicationConfig, progressBar ProgressBar) (<-chan ApplicationConfig, <-chan Event, <-chan Warnings, <-chan error)
- func (actor Actor) BindRoutes(config ApplicationConfig) (ApplicationConfig, bool, Warnings, error)
- func (actor Actor) ConvertToApplicationConfigs(orgGUID string, spaceGUID string, apps []manifest.Application) ([]ApplicationConfig, Warnings, error)
- func (actor Actor) CreateArchive(config ApplicationConfig) (string, error)
- func (actor Actor) CreateOrUpdateApp(config ApplicationConfig) (ApplicationConfig, Event, Warnings, error)
- func (actor Actor) CreateRoutes(config ApplicationConfig) (ApplicationConfig, bool, Warnings, error)
- func (actor Actor) DefaultDomain(orgGUID string) (v2action.Domain, Warnings, error)
- func (actor Actor) FindOrReturnPartialApp(appName string, spaceGUID string) (bool, v2action.Application, v2action.Warnings, error)
- func (actor Actor) GetRouteWithDefaultDomain(host string, orgGUID string, spaceGUID string, knownRoutes []v2action.Route) (v2action.Route, Warnings, error)
- func (_ Actor) MergeAndValidateSettingsAndManifests(cmdConfig CommandLineSettings, apps []manifest.Application) ([]manifest.Application, error)
- func (actor Actor) UploadPackage(config ApplicationConfig, archivePath string, progressbar ProgressBar, ...) (Warnings, error)
- type ApplicationConfig
- type CommandLineSettings
- type Event
- type NoDomainsFoundError
- type ProgressBar
- type UploadFailedError
- type V2Actor
- type Warnings
Constants ¶
View Source
const PushRetries = 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct {
V2Actor V2Actor
}
Actor handles all business logic for Cloud Controller v2 operations.
func (Actor) Apply ¶
func (actor Actor) Apply(config ApplicationConfig, progressBar ProgressBar) (<-chan ApplicationConfig, <-chan Event, <-chan Warnings, <-chan error)
func (Actor) BindRoutes ¶
func (actor Actor) BindRoutes(config ApplicationConfig) (ApplicationConfig, bool, Warnings, error)
func (Actor) ConvertToApplicationConfigs ¶
func (actor Actor) ConvertToApplicationConfigs(orgGUID string, spaceGUID string, apps []manifest.Application) ([]ApplicationConfig, Warnings, error)
func (Actor) CreateArchive ¶
func (actor Actor) CreateArchive(config ApplicationConfig) (string, error)
func (Actor) CreateOrUpdateApp ¶
func (actor Actor) CreateOrUpdateApp(config ApplicationConfig) (ApplicationConfig, Event, Warnings, error)
func (Actor) CreateRoutes ¶
func (actor Actor) CreateRoutes(config ApplicationConfig) (ApplicationConfig, bool, Warnings, error)
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) FindOrReturnPartialApp ¶
func (Actor) GetRouteWithDefaultDomain ¶
func (actor Actor) GetRouteWithDefaultDomain(host string, orgGUID string, spaceGUID string, knownRoutes []v2action.Route) (v2action.Route, Warnings, error)
GetRouteWithDefaultDomain returns a route with the host and the default org domain. This may be a partial route (ie no GUID) if the route does not exist.
func (Actor) MergeAndValidateSettingsAndManifests ¶
func (_ Actor) MergeAndValidateSettingsAndManifests(cmdConfig CommandLineSettings, apps []manifest.Application) ([]manifest.Application, error)
func (Actor) UploadPackage ¶
func (actor Actor) UploadPackage(config ApplicationConfig, archivePath string, progressbar ProgressBar, eventStream chan<- Event) (Warnings, error)
type ApplicationConfig ¶
type ApplicationConfig struct { CurrentApplication v2action.Application DesiredApplication v2action.Application CurrentRoutes []v2action.Route DesiredRoutes []v2action.Route AllResources []v2action.Resource TargetedSpaceGUID string Path string }
func (ApplicationConfig) CreatingApplication ¶
func (config ApplicationConfig) CreatingApplication() bool
func (ApplicationConfig) UpdatingApplication ¶
func (config ApplicationConfig) UpdatingApplication() bool
type CommandLineSettings ¶
type Event ¶
type Event string
const ( SettingUpApplication Event = "setting up application" CreatedApplication Event = "created application" UpdatedApplication Event = "updated application" ConfiguringRoutes Event = "configuring routes" CreatedRoutes Event = "created routes" BoundRoutes Event = "bound routes" CreatingArchive Event = "creating archive" UploadingApplication Event = "uploading application" UploadComplete Event = "upload complete" RetryUpload Event = "retry upload" Complete Event = "complete" )
type NoDomainsFoundError ¶
type NoDomainsFoundError struct {
OrganizationGUID string
}
NoDomainsFoundError is returned when there are no private or shared domains accessible to an organization.
func (NoDomainsFoundError) Error ¶
func (e NoDomainsFoundError) Error() string
type ProgressBar ¶
type UploadFailedError ¶
type UploadFailedError struct {
Err error
}
func (UploadFailedError) Error ¶
func (_ UploadFailedError) Error() string
type V2Actor ¶
type V2Actor interface { BindRouteToApplication(routeGUID string, appGUID string) (v2action.Warnings, error) CreateApplication(application v2action.Application) (v2action.Application, v2action.Warnings, error) CreateRoute(route v2action.Route, generatePort bool) (v2action.Route, v2action.Warnings, error) FindRouteBoundToSpaceWithSettings(route v2action.Route) (v2action.Route, v2action.Warnings, error) GatherResources(sourceDir string) ([]v2action.Resource, error) GetApplicationByNameAndSpace(name string, spaceGUID string) (v2action.Application, v2action.Warnings, error) GetApplicationRoutes(applicationGUID string) ([]v2action.Route, v2action.Warnings, error) GetOrganizationDomains(orgGUID string) ([]v2action.Domain, v2action.Warnings, error) PollJob(job v2action.Job) (v2action.Warnings, error) UpdateApplication(application v2action.Application) (v2action.Application, v2action.Warnings, error) UploadApplicationPackage(appGUID string, existingResources []v2action.Resource, newResources io.Reader, newResourcesLength int64) (v2action.Job, v2action.Warnings, error) ZipResources(sourceDir string, filesToInclude []v2action.Resource) (string, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.