controller

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: 13 Imported by: 0

Documentation

Overview

Package controller provides a client for each version of the controller API.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("controller: resource not found")

ErrNotFound is returned when a resource is not found (HTTP status 404).

Functions

This section is empty.

Types

type Client

type Client interface {
	GetCACert() ([]byte, error)
	StreamFormations(since *time.Time, output chan<- *ct.ExpandedFormation) (stream.Stream, error)
	PutDomain(dm *ct.DomainMigration) error
	CreateArtifact(artifact *ct.Artifact) error
	CreateRelease(release *ct.Release) error
	CreateApp(app *ct.App) error
	UpdateApp(app *ct.App) error
	UpdateAppMeta(app *ct.App) error
	DeleteApp(appID string) (*ct.AppDeletion, error)
	CreateProvider(provider *ct.Provider) error
	GetProvider(providerID string) (*ct.Provider, error)
	ProvisionResource(req *ct.ResourceReq) (*ct.Resource, error)
	GetResource(providerID, resourceID string) (*ct.Resource, error)
	ResourceListAll() ([]*ct.Resource, error)
	ResourceList(providerID string) ([]*ct.Resource, error)
	AddResourceApp(providerID, resourceID, appID string) (*ct.Resource, error)
	DeleteResourceApp(providerID, resourceID, appID string) (*ct.Resource, error)
	AppResourceList(appID string) ([]*ct.Resource, error)
	PutResource(resource *ct.Resource) error
	DeleteResource(providerID, resourceID string) (*ct.Resource, error)
	PutFormation(formation *ct.Formation) error
	PutJob(job *ct.Job) error
	DeleteJob(appID, jobID string) error
	SetAppRelease(appID, releaseID string) error
	GetAppRelease(appID string) (*ct.Release, error)
	RouteList(appID string) ([]*router.Route, error)
	GetRoute(appID string, routeID string) (*router.Route, error)
	CreateRoute(appID string, route *router.Route) error
	UpdateRoute(appID string, routeID string, route *router.Route) error
	DeleteRoute(appID string, routeID string) error
	GetFormation(appID, releaseID string) (*ct.Formation, error)
	GetExpandedFormation(appID, releaseID string) (*ct.ExpandedFormation, error)
	FormationList(appID string) ([]*ct.Formation, error)
	FormationListActive() ([]*ct.ExpandedFormation, error)
	DeleteFormation(appID, releaseID string) error
	GetRelease(releaseID string) (*ct.Release, error)
	GetArtifact(artifactID string) (*ct.Artifact, error)
	GetApp(appID string) (*ct.App, error)
	GetAppLog(appID string, options *ct.LogOpts) (io.ReadCloser, error)
	StreamAppLog(appID string, options *ct.LogOpts, output chan<- *ct.SSELogChunk) (stream.Stream, error)
	GetDeployment(deploymentID string) (*ct.Deployment, error)
	CreateDeployment(appID, releaseID string) (*ct.Deployment, error)
	DeploymentList(appID string) ([]*ct.Deployment, error)
	StreamDeployment(d *ct.Deployment, output chan *ct.DeploymentEvent) (stream.Stream, error)
	DeployAppRelease(appID, releaseID string, stopWait <-chan struct{}) error
	StreamJobEvents(appID string, output chan *ct.Job) (stream.Stream, error)
	WatchJobEvents(appID, releaseID string) (ct.JobWatcher, error)
	StreamEvents(opts ct.StreamEventsOptions, output chan *ct.Event) (stream.Stream, error)
	ListEvents(opts ct.ListEventsOptions) ([]*ct.Event, error)
	GetEvent(id int64) (*ct.Event, error)
	ExpectedScalingEvents(actual, expected map[string]int, releaseProcesses map[string]ct.ProcessType, clusterSize int) ct.JobEvents
	RunJobAttached(appID string, job *ct.NewJob) (httpclient.ReadWriteCloser, error)
	RunJobDetached(appID string, req *ct.NewJob) (*ct.Job, error)
	GetJob(appID, jobID string) (*ct.Job, error)
	JobList(appID string) ([]*ct.Job, error)
	JobListActive() ([]*ct.Job, error)
	AppList() ([]*ct.App, error)
	KeyList() ([]*ct.Key, error)
	ArtifactList() ([]*ct.Artifact, error)
	ReleaseList() ([]*ct.Release, error)
	AppReleaseList(appID string) ([]*ct.Release, error)
	CreateKey(pubKey string) (*ct.Key, error)
	GetKey(keyID string) (*ct.Key, error)
	DeleteKey(id string) error
	ProviderList() ([]*ct.Provider, error)
	Backup() (io.ReadCloser, error)
	GetBackupMeta() (*ct.ClusterBackup, error)
	DeleteRelease(appID, releaseID string) (*ct.ReleaseDeletion, error)
	ScheduleAppGarbageCollection(appID string) error
}

func NewClient

func NewClient(uri, key string) (Client, error)

NewClient creates a new Client pointing at uri and using key for authentication.

func NewClientWithConfig

func NewClientWithConfig(uri, key string, config Config) (Client, error)

NewClientWithConfig acts like NewClient, but supports custom configuration.

func NewClientWithHTTP

func NewClientWithHTTP(uri, key string, httpClient *http.Client) (Client, error)

type Config

type Config struct {
	Pin    []byte
	Domain string
}

Directories

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

Jump to

Keyboard shortcuts

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