Documentation ¶
Overview ¶
Package v1controller provides a client for v1 of the controller API.
Index ¶
- type Client
- func (c *Client) AddResourceApp(providerID, resourceID, appID string) (*ct.Resource, error)
- func (c *Client) AppList() ([]*ct.App, error)
- func (c *Client) AppReleaseList(appID string) ([]*ct.Release, error)
- func (c *Client) AppResourceList(appID string) ([]*ct.Resource, error)
- func (c *Client) ArtifactList() ([]*ct.Artifact, error)
- func (c *Client) Backup() (io.ReadCloser, error)
- func (c *Client) CreateApp(app *ct.App) error
- func (c *Client) CreateArtifact(artifact *ct.Artifact) error
- func (c *Client) CreateDeployment(appID, releaseID string) (*ct.Deployment, error)
- func (c *Client) CreateKey(pubKey string) (*ct.Key, error)
- func (c *Client) CreateProvider(provider *ct.Provider) error
- func (c *Client) CreateRelease(release *ct.Release) error
- func (c *Client) CreateRoute(appID string, route *router.Route) error
- func (c *Client) Delete(path string, out interface{}) error
- func (c *Client) DeleteApp(appID string) (*ct.AppDeletion, error)
- func (c *Client) DeleteFormation(appID, releaseID string) error
- func (c *Client) DeleteJob(appID, jobID string) error
- func (c *Client) DeleteKey(id string) error
- func (c *Client) DeleteRelease(appID, releaseID string) (*ct.ReleaseDeletion, error)
- func (c *Client) DeleteResource(providerID, resourceID string) (*ct.Resource, error)
- func (c *Client) DeleteResourceApp(providerID, resourceID, appID string) (*ct.Resource, error)
- func (c *Client) DeleteRoute(appID string, routeID string) error
- func (c *Client) DeployAppRelease(appID, releaseID string, stopWait <-chan struct{}) error
- func (c *Client) DeploymentList(appID string) ([]*ct.Deployment, error)
- func (c *Client) ExpectedScalingEvents(actual, expected map[string]int, releaseProcesses map[string]ct.ProcessType, ...) ct.JobEvents
- func (c *Client) FormationList(appID string) ([]*ct.Formation, error)
- func (c *Client) FormationListActive() ([]*ct.ExpandedFormation, error)
- func (c *Client) Get(path string, out interface{}) error
- func (c *Client) GetApp(appID string) (*ct.App, error)
- func (c *Client) GetAppLog(appID string, options *ct.LogOpts) (io.ReadCloser, error)
- func (c *Client) GetAppRelease(appID string) (*ct.Release, error)
- func (c *Client) GetArtifact(artifactID string) (*ct.Artifact, error)
- func (c *Client) GetBackupMeta() (*ct.ClusterBackup, error)
- func (c *Client) GetCACert() ([]byte, error)
- func (c *Client) GetDeployment(deploymentID string) (*ct.Deployment, error)
- func (c *Client) GetEvent(id int64) (*ct.Event, error)
- func (c *Client) GetExpandedFormation(appID, releaseID string) (*ct.ExpandedFormation, error)
- func (c *Client) GetFormation(appID, releaseID string) (*ct.Formation, error)
- func (c *Client) GetJob(appID, jobID string) (*ct.Job, error)
- func (c *Client) GetKey(keyID string) (*ct.Key, error)
- func (c *Client) GetProvider(providerID string) (*ct.Provider, error)
- func (c *Client) GetRelease(releaseID string) (*ct.Release, error)
- func (c *Client) GetResource(providerID, resourceID string) (*ct.Resource, error)
- func (c *Client) GetRoute(appID string, routeID string) (*router.Route, error)
- func (c *Client) JobList(appID string) ([]*ct.Job, error)
- func (c *Client) JobListActive() ([]*ct.Job, error)
- func (c *Client) KeyList() ([]*ct.Key, error)
- func (c *Client) ListEvents(opts ct.ListEventsOptions) ([]*ct.Event, error)
- func (c *Client) Post(path string, in, out interface{}) error
- func (c *Client) ProviderList() ([]*ct.Provider, error)
- func (c *Client) ProvisionResource(req *ct.ResourceReq) (*ct.Resource, error)
- func (c *Client) Put(path string, in, out interface{}) error
- func (c *Client) PutDomain(dm *ct.DomainMigration) error
- func (c *Client) PutFormation(formation *ct.Formation) error
- func (c *Client) PutJob(job *ct.Job) error
- func (c *Client) PutResource(resource *ct.Resource) error
- func (c *Client) ReleaseList() ([]*ct.Release, error)
- func (c *Client) ResourceList(providerID string) ([]*ct.Resource, error)
- func (c *Client) ResourceListAll() ([]*ct.Resource, error)
- func (c *Client) RouteList(appID string) ([]*router.Route, error)
- func (c *Client) RunJobAttached(appID string, job *ct.NewJob) (httpclient.ReadWriteCloser, error)
- func (c *Client) RunJobDetached(appID string, req *ct.NewJob) (*ct.Job, error)
- func (c *Client) ScheduleAppGarbageCollection(appID string) error
- func (c *Client) SetAppRelease(appID, releaseID string) error
- func (c *Client) StreamAppLog(appID string, options *ct.LogOpts, output chan<- *ct.SSELogChunk) (stream.Stream, error)
- func (c *Client) StreamDeployment(d *ct.Deployment, output chan *ct.DeploymentEvent) (stream.Stream, error)
- func (c *Client) StreamEvents(opts ct.StreamEventsOptions, output chan *ct.Event) (stream.Stream, error)
- func (c *Client) StreamFormations(since *time.Time, output chan<- *ct.ExpandedFormation) (stream.Stream, error)
- func (c *Client) StreamJobEvents(appID string, output chan *ct.Job) (stream.Stream, error)
- func (c *Client) UpdateApp(app *ct.App) error
- func (c *Client) UpdateAppMeta(app *ct.App) error
- func (c *Client) UpdateRoute(appID string, routeID string, route *router.Route) error
- func (c *Client) WatchJobEvents(appID, releaseID string) (ct.JobWatcher, error)
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 ¶
AddResourceApp adds appID to the resource identified by resourceID and returns the resource
func (*Client) AppReleaseList ¶
AppReleaseList returns a list of all releases under appID.
func (*Client) AppResourceList ¶
AppResourceList returns a list of all resources under appID.
func (*Client) ArtifactList ¶
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) CreateArtifact ¶
CreateArtifact creates a new artifact.
func (*Client) CreateDeployment ¶
func (c *Client) CreateDeployment(appID, releaseID string) (*ct.Deployment, error)
func (*Client) CreateProvider ¶
CreateProvider creates a new provider.
func (*Client) CreateRelease ¶
CreateRelease creates a new release.
func (*Client) CreateRoute ¶
CreateRoute creates a new route for the specified app.
func (*Client) DeleteApp ¶
func (c *Client) DeleteApp(appID string) (*ct.AppDeletion, error)
DeleteApp deletes an app.
func (*Client) DeleteFormation ¶
DeleteFormation deletes the formation matching appID and releaseID.
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 ¶
DeleteResource deprovisions and deletes the resource identified by resourceID under providerID.
func (*Client) DeleteResourceApp ¶
DeleteResourceApp removes appID from the resource identified by resourceID and returns the resource
func (*Client) DeleteRoute ¶
DeleteRoute deletes a route under the specified app.
func (*Client) DeployAppRelease ¶
func (*Client) DeploymentList ¶
func (c *Client) DeploymentList(appID string) ([]*ct.Deployment, error)
DeploymentList returns a list of all deployments.
func (*Client) ExpectedScalingEvents ¶
func (*Client) FormationList ¶
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) GetAppLog ¶
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 ¶
GetAppRelease returns the current release of an app.
func (*Client) GetArtifact ¶
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) GetDeployment ¶
func (c *Client) GetDeployment(deploymentID string) (*ct.Deployment, error)
GetDeployment returns a deployment queued on the deployer.
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 ¶
GetFormation returns details for the specified formation under app and release.
func (*Client) GetProvider ¶
GetProvider returns the provider identified by providerID.
func (*Client) GetRelease ¶
GetRelease returns details for the specified release.
func (*Client) GetResource ¶
GetResource returns the resource identified by resourceID under providerID.
func (*Client) JobListActive ¶
JobListActive returns a list of all active jobs.
func (*Client) ListEvents ¶
func (*Client) ProviderList ¶
ProviderList returns a list of all providers.
func (*Client) ProvisionResource ¶
ProvisionResource uses a provider to provision a new resource for the application. Returns details about the resource.
func (*Client) PutDomain ¶
func (c *Client) PutDomain(dm *ct.DomainMigration) error
PutDomain migrates the cluster domain
func (*Client) PutFormation ¶
PutFormation updates an existing formation.
func (*Client) PutResource ¶
PutResource updates a resource.
func (*Client) ReleaseList ¶
ReleaseList returns a list of all releases
func (*Client) ResourceList ¶
ResourceList returns all resources under providerID.
func (*Client) ResourceListAll ¶
ResourceListAll returns all resources.
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 ¶
RunJobDetached runs a new job under the specified app, returning the job's details.
func (*Client) ScheduleAppGarbageCollection ¶
ScheduleAppGarbageCollection schedules a garbage collection cycle for the app
func (*Client) SetAppRelease ¶
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 (*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 ¶
StreamJobEvents streams job events to the output channel.
func (*Client) UpdateAppMeta ¶
UpdateAppMeta updates the meta using app.ID, allowing empty meta to be set explicitly.
func (*Client) UpdateRoute ¶
UpdateRoute updates details for the routeID under the specified app.
func (*Client) WatchJobEvents ¶
func (c *Client) WatchJobEvents(appID, releaseID string) (ct.JobWatcher, error)