v1controller

package
v0.0.0-...-8488f5b Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2016 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package v1controller provides a client for v1 of the controller API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*httpclient.Client
}

Client is a client for the v1 of the controller API.

func (*Client) AddResourceApp

func (c *Client) AddResourceApp(providerID, resourceID, appID string) (*ct.Resource, error)

AddResourceApp adds appID to the resource identified by resourceID and returns the resource

func (*Client) AppList

func (c *Client) AppList() ([]*ct.App, error)

AppList returns a list of all apps.

func (*Client) AppReleaseList

func (c *Client) AppReleaseList(appID string) ([]*ct.Release, error)

AppReleaseList returns a list of all releases under appID.

func (*Client) AppResourceList

func (c *Client) AppResourceList(appID string) ([]*ct.Resource, error)

AppResourceList returns a list of all resources under appID.

func (*Client) ArtifactList

func (c *Client) ArtifactList() ([]*ct.Artifact, error)

ArtifactList returns a list of all artifacts

func (*Client) Backup

func (c *Client) Backup() (io.ReadCloser, error)

Backup takes a backup of the cluster

func (*Client) CreateApp

func (c *Client) CreateApp(app *ct.App) error

CreateApp creates a new app.

func (*Client) CreateArtifact

func (c *Client) CreateArtifact(artifact *ct.Artifact) error

CreateArtifact creates a new artifact.

func (*Client) CreateDeployment

func (c *Client) CreateDeployment(appID, releaseID string) (*ct.Deployment, error)

func (*Client) CreateKey

func (c *Client) CreateKey(pubKey string) (*ct.Key, error)

CreateKey uploads pubKey as the ssh public key.

func (*Client) CreateProvider

func (c *Client) CreateProvider(provider *ct.Provider) error

CreateProvider creates a new provider.

func (*Client) CreateRelease

func (c *Client) CreateRelease(release *ct.Release) error

CreateRelease creates a new release.

func (*Client) CreateRoute

func (c *Client) CreateRoute(appID string, route *router.Route) error

CreateRoute creates a new route for the specified app.

func (*Client) Delete

func (c *Client) Delete(path string, out interface{}) error

func (*Client) DeleteApp

func (c *Client) DeleteApp(appID string) (*ct.AppDeletion, error)

DeleteApp deletes an app.

func (*Client) DeleteFormation

func (c *Client) DeleteFormation(appID, releaseID string) error

DeleteFormation deletes the formation matching appID and releaseID.

func (*Client) DeleteJob

func (c *Client) DeleteJob(appID, jobID string) error

DeleteJob kills a specific job id under the specified app.

func (*Client) DeleteKey

func (c *Client) DeleteKey(id string) error

DeleteKey deletes a key with the specified id.

func (*Client) DeleteRelease

func (c *Client) DeleteRelease(appID, releaseID string) (*ct.ReleaseDeletion, error)

DeleteRelease deletes a release and any associated file artifacts.

func (*Client) DeleteResource

func (c *Client) DeleteResource(providerID, resourceID string) (*ct.Resource, error)

DeleteResource deprovisions and deletes the resource identified by resourceID under providerID.

func (*Client) DeleteResourceApp

func (c *Client) DeleteResourceApp(providerID, resourceID, appID string) (*ct.Resource, error)

DeleteResourceApp removes appID from the resource identified by resourceID and returns the resource

func (*Client) DeleteRoute

func (c *Client) DeleteRoute(appID string, routeID string) error

DeleteRoute deletes a route under the specified app.

func (*Client) DeployAppRelease

func (c *Client) DeployAppRelease(appID, releaseID string, stopWait <-chan struct{}) error

func (*Client) DeploymentList

func (c *Client) DeploymentList(appID string) ([]*ct.Deployment, error)

DeploymentList returns a list of all deployments.

func (*Client) ExpectedScalingEvents

func (c *Client) ExpectedScalingEvents(actual, expected map[string]int, releaseProcesses map[string]ct.ProcessType, clusterSize int) ct.JobEvents

func (*Client) FormationList

func (c *Client) FormationList(appID string) ([]*ct.Formation, error)

FormationList returns a list of all formations under appID.

func (*Client) FormationListActive

func (c *Client) FormationListActive() ([]*ct.ExpandedFormation, error)

FormationListActive returns a list of all active formations (i.e. formations whose process count is greater than zero).

func (*Client) Get

func (c *Client) Get(path string, out interface{}) error

func (*Client) GetApp

func (c *Client) GetApp(appID string) (*ct.App, error)

GetApp returns details for the specified app.

func (*Client) GetAppLog

func (c *Client) GetAppLog(appID string, options *ct.LogOpts) (io.ReadCloser, error)

GetAppLog returns a ReadCloser log stream of the app with ID appID. If lines is zero or above, the number of lines returned will be capped at that value. Otherwise, all available logs are returned. If follow is true, new log lines are streamed after the buffered log.

func (*Client) GetAppRelease

func (c *Client) GetAppRelease(appID string) (*ct.Release, error)

GetAppRelease returns the current release of an app.

func (*Client) GetArtifact

func (c *Client) GetArtifact(artifactID string) (*ct.Artifact, error)

GetArtifact returns details for the specified artifact.

func (*Client) GetBackupMeta

func (c *Client) GetBackupMeta() (*ct.ClusterBackup, error)

GetBackupMeta returns metadata for latest backup

func (*Client) GetCACert

func (c *Client) GetCACert() ([]byte, error)

GetCACert returns the CA cert for the controller

func (*Client) GetDeployment

func (c *Client) GetDeployment(deploymentID string) (*ct.Deployment, error)

GetDeployment returns a deployment queued on the deployer.

func (*Client) GetEvent

func (c *Client) GetEvent(id int64) (*ct.Event, error)

func (*Client) GetExpandedFormation

func (c *Client) GetExpandedFormation(appID, releaseID string) (*ct.ExpandedFormation, error)

GetExpandedFormation returns expanded details for the specified formation under app and release.

func (*Client) GetFormation

func (c *Client) GetFormation(appID, releaseID string) (*ct.Formation, error)

GetFormation returns details for the specified formation under app and release.

func (*Client) GetJob

func (c *Client) GetJob(appID, jobID string) (*ct.Job, error)

GetJob returns a Job for the given app and job ID

func (*Client) GetKey

func (c *Client) GetKey(keyID string) (*ct.Key, error)

GetKey returns details for the keyID.

func (*Client) GetProvider

func (c *Client) GetProvider(providerID string) (*ct.Provider, error)

GetProvider returns the provider identified by providerID.

func (*Client) GetRelease

func (c *Client) GetRelease(releaseID string) (*ct.Release, error)

GetRelease returns details for the specified release.

func (*Client) GetResource

func (c *Client) GetResource(providerID, resourceID string) (*ct.Resource, error)

GetResource returns the resource identified by resourceID under providerID.

func (*Client) GetRoute

func (c *Client) GetRoute(appID string, routeID string) (*router.Route, error)

GetRoute returns details for the routeID under the specified app.

func (*Client) JobList

func (c *Client) JobList(appID string) ([]*ct.Job, error)

JobList returns a list of all jobs.

func (*Client) JobListActive

func (c *Client) JobListActive() ([]*ct.Job, error)

JobListActive returns a list of all active jobs.

func (*Client) KeyList

func (c *Client) KeyList() ([]*ct.Key, error)

KeyList returns a list of all ssh public keys added.

func (*Client) ListEvents

func (c *Client) ListEvents(opts ct.ListEventsOptions) ([]*ct.Event, error)

func (*Client) Post

func (c *Client) Post(path string, in, out interface{}) error

func (*Client) ProviderList

func (c *Client) ProviderList() ([]*ct.Provider, error)

ProviderList returns a list of all providers.

func (*Client) ProvisionResource

func (c *Client) ProvisionResource(req *ct.ResourceReq) (*ct.Resource, error)

ProvisionResource uses a provider to provision a new resource for the application. Returns details about the resource.

func (*Client) Put

func (c *Client) Put(path string, in, out interface{}) error

func (*Client) PutDomain

func (c *Client) PutDomain(dm *ct.DomainMigration) error

PutDomain migrates the cluster domain

func (*Client) PutFormation

func (c *Client) PutFormation(formation *ct.Formation) error

PutFormation updates an existing formation.

func (*Client) PutJob

func (c *Client) PutJob(job *ct.Job) error

PutJob updates an existing job.

func (*Client) PutResource

func (c *Client) PutResource(resource *ct.Resource) error

PutResource updates a resource.

func (*Client) ReleaseList

func (c *Client) ReleaseList() ([]*ct.Release, error)

ReleaseList returns a list of all releases

func (*Client) ResourceList

func (c *Client) ResourceList(providerID string) ([]*ct.Resource, error)

ResourceList returns all resources under providerID.

func (*Client) ResourceListAll

func (c *Client) ResourceListAll() ([]*ct.Resource, error)

ResourceListAll returns all resources.

func (*Client) RouteList

func (c *Client) RouteList(appID string) ([]*router.Route, error)

RouteList returns all routes for an app.

func (*Client) RunJobAttached

func (c *Client) RunJobAttached(appID string, job *ct.NewJob) (httpclient.ReadWriteCloser, error)

RunJobAttached runs a new job under the specified app, attaching to the job and returning a ReadWriteCloser stream, which can then be used for communicating with the job.

func (*Client) RunJobDetached

func (c *Client) RunJobDetached(appID string, req *ct.NewJob) (*ct.Job, error)

RunJobDetached runs a new job under the specified app, returning the job's details.

func (*Client) ScheduleAppGarbageCollection

func (c *Client) ScheduleAppGarbageCollection(appID string) error

ScheduleAppGarbageCollection schedules a garbage collection cycle for the app

func (*Client) SetAppRelease

func (c *Client) SetAppRelease(appID, releaseID string) error

SetAppRelease sets the specified release as the current release for an app.

func (*Client) StreamAppLog

func (c *Client) StreamAppLog(appID string, options *ct.LogOpts, output chan<- *ct.SSELogChunk) (stream.Stream, error)

StreamAppLog is the same as GetAppLog but returns log lines via an SSE stream

func (*Client) StreamDeployment

func (c *Client) StreamDeployment(d *ct.Deployment, output chan *ct.DeploymentEvent) (stream.Stream, error)

func (*Client) StreamEvents

func (c *Client) StreamEvents(opts ct.StreamEventsOptions, output chan *ct.Event) (stream.Stream, error)

func (*Client) StreamFormations

func (c *Client) StreamFormations(since *time.Time, output chan<- *ct.ExpandedFormation) (stream.Stream, error)

StreamFormations yields a series of ExpandedFormation into the provided channel. If since is not nil, only retrieves formation updates since the specified time.

func (*Client) StreamJobEvents

func (c *Client) StreamJobEvents(appID string, output chan *ct.Job) (stream.Stream, error)

StreamJobEvents streams job events to the output channel.

func (*Client) UpdateApp

func (c *Client) UpdateApp(app *ct.App) error

UpdateApp updates the meta and strategy using app.ID.

func (*Client) UpdateAppMeta

func (c *Client) UpdateAppMeta(app *ct.App) error

UpdateAppMeta updates the meta using app.ID, allowing empty meta to be set explicitly.

func (*Client) UpdateRoute

func (c *Client) UpdateRoute(appID string, routeID string, route *router.Route) error

UpdateRoute updates details for the routeID under the specified app.

func (*Client) WatchJobEvents

func (c *Client) WatchJobEvents(appID, releaseID string) (ct.JobWatcher, error)

Jump to

Keyboard shortcuts

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