controller

package
v0.0.0-...-c283e9f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: BSD-3-Clause Imports: 14 Imported by: 49

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 = ct.ErrNotFound

Functions

This section is empty.

Types

type Client

type Client interface {
	SetKey(newKey string)
	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(appID string, 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
	PutScaleRequest(req *ct.ScaleRequest) error
	PutJob(job *ct.Job) error
	DeleteJob(appID, jobID string) error
	SetAppRelease(appID, releaseID string) error
	GetAppRelease(appID string) (*ct.Release, error)
	RouteList() ([]*router.Route, error)
	AppRouteList(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 *logagg.LogOpts) (io.ReadCloser, error)
	StreamAppLog(appID string, options *logagg.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
	ScaleAppRelease(appID, releaseID string, opts ct.ScaleOptions) 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)
	ArtifactList() ([]*ct.Artifact, error)
	ReleaseList() ([]*ct.Release, error)
	AppReleaseList(appID string) ([]*ct.Release, error)
	ProviderList() ([]*ct.Provider, error)
	VolumeList() ([]*ct.Volume, error)
	AppVolumeList(appID string) ([]*ct.Volume, error)
	GetVolume(appID, volID string) (*ct.Volume, error)
	PutVolume(vol *ct.Volume) error
	DecommissionVolume(appID string, vol *ct.Volume) error
	StreamVolumes(since *time.Time, output chan *ct.Volume) (stream.Stream, error)
	Backup() (io.ReadCloser, error)
	GetBackupMeta() (*ct.ClusterBackup, error)
	DeleteRelease(appID, releaseID string) (*ct.ReleaseDeletion, error)
	ScheduleAppGarbageCollection(appID string) error
	Status() (*status.Status, error)
	CreateSink(sink *ct.Sink) error
	GetSink(sinkID string) (*ct.Sink, error)
	DeleteSink(sinkID string) (*ct.Sink, error)
	ListSinks() ([]*ct.Sink, error)
	StreamSinks(since *time.Time, output chan *ct.Sink) (stream.Stream, 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