Documentation ¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func ErrorNotFound(err error) bool
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type AWSProvider
- func (p *AWSProvider) AppCancel(name string) error
- func (p *AWSProvider) AppDelete(name string) error
- func (p *AWSProvider) AppGet(name string) (*structs.App, error)
- func (p *AWSProvider) BuildCreate(app, method, url string, opts structs.BuildOptions) (*structs.Build, error)
- func (p *AWSProvider) BuildDelete(app, id string) (*structs.Build, error)
- func (p *AWSProvider) BuildExport(app, id string, w io.Writer) error
- func (p *AWSProvider) BuildGet(app, id string) (*structs.Build, error)
- func (p *AWSProvider) BuildImport(app string, r io.Reader) (*structs.Build, error)
- func (p *AWSProvider) BuildList(app string, limit int64) (structs.Builds, error)
- func (p *AWSProvider) BuildLogs(app, id string, w io.Writer) error
- func (p *AWSProvider) BuildRelease(b *structs.Build) (*structs.Release, error)
- func (p *AWSProvider) BuildSave(b *structs.Build) error
- func (p *AWSProvider) CapacityGet() (*structs.Capacity, error)
- func (p *AWSProvider) CertificateCreate(pub, key, chain string) (*structs.Certificate, error)
- func (p *AWSProvider) CertificateDelete(id string) error
- func (p *AWSProvider) CertificateGenerate(domains []string) (*structs.Certificate, error)
- func (p *AWSProvider) CertificateList() (structs.Certificates, error)
- func (p *AWSProvider) EnvironmentGet(app string) (structs.Environment, error)
- func (p *AWSProvider) EventSend(e *structs.Event, err error) error
- func (p *AWSProvider) FormationGet(app, process string) (*structs.ProcessFormation, error)
- func (p *AWSProvider) FormationList(app string) (structs.Formation, error)
- func (p *AWSProvider) FormationSave(app string, pf *structs.ProcessFormation) error
- func (p *AWSProvider) IndexDiff(index *structs.Index) ([]string, error)
- func (p *AWSProvider) IndexDownload(index *structs.Index, dir string) error
- func (p *AWSProvider) IndexUpload(hash string, data []byte) error
- func (p *AWSProvider) Initialize(opts structs.ProviderOptions) error
- func (p *AWSProvider) InstanceList() (structs.Instances, error)
- func (p *AWSProvider) InstanceTerminate(id string) error
- func (p *AWSProvider) IsTest() bool
- func (p *AWSProvider) KeyDecrypt(data []byte) ([]byte, error)
- func (p *AWSProvider) KeyEncrypt(data []byte) ([]byte, error)
- func (p *AWSProvider) LogStream(app string, w io.Writer, opts structs.LogStreamOptions) error
- func (p *AWSProvider) ObjectDelete(key string) error
- func (p *AWSProvider) ObjectExists(key string) bool
- func (p *AWSProvider) ObjectFetch(key string) (io.ReadCloser, error)
- func (p *AWSProvider) ObjectList(prefix string) ([]string, error)
- func (p *AWSProvider) ObjectStore(key string, r io.Reader, opts structs.ObjectOptions) (string, error)
- func (p *AWSProvider) ProcessExec(app, pid, command string, stream io.ReadWriter, ...) error
- func (p *AWSProvider) ProcessGet(app, pid string) (*structs.Process, error)
- func (p *AWSProvider) ProcessList(app string) (structs.Processes, error)
- func (p *AWSProvider) ProcessRun(app, process string, opts structs.ProcessRunOptions) (string, error)
- func (p *AWSProvider) ProcessStop(app, pid string) error
- func (p *AWSProvider) RegistryAdd(server, username, password string) (*structs.Registry, error)
- func (p *AWSProvider) RegistryDelete(server string) error
- func (p *AWSProvider) RegistryList() (structs.Registries, error)
- func (p *AWSProvider) ReleaseDelete(app, buildID string) error
- func (p *AWSProvider) ReleaseGet(app, id string) (*structs.Release, error)
- func (p *AWSProvider) ReleaseList(app string, limit int64) (structs.Releases, error)
- func (p *AWSProvider) ReleasePromote(r *structs.Release) error
- func (p *AWSProvider) ReleaseSave(r *structs.Release) error
- func (p *AWSProvider) ResourceCreate(name, kind string, params map[string]string) (*structs.Resource, error)
- func (p *AWSProvider) ResourceDelete(name string) (*structs.Resource, error)
- func (p *AWSProvider) ResourceGet(name string) (*structs.Resource, error)
- func (p *AWSProvider) ResourceLink(name, app, process string) (*structs.Resource, error)
- func (p *AWSProvider) ResourceList() (structs.Resources, error)
- func (p *AWSProvider) ResourceUnlink(name, app, process string) (*structs.Resource, error)
- func (p *AWSProvider) ResourceUpdate(name string, params map[string]string) (*structs.Resource, error)
- func (p *AWSProvider) SystemGet() (*structs.System, error)
- func (p *AWSProvider) SystemLogs(w io.Writer, opts structs.LogStreamOptions) error
- func (p *AWSProvider) SystemProcesses(opts structs.SystemProcessesOptions) (structs.Processes, error)
- func (p *AWSProvider) SystemReleases() (structs.Releases, error)
- func (p *AWSProvider) SystemSave(system structs.System) error
- type CfsslCertificateBundle
- type CfsslError
- type ECSServices
- type NoSuchBuild
- type Template
- type TemplateParameter
Constants ¶
const ( KeyLength = 32 NonceLength = 24 )
const StatusCodePrefix = "F1E49A85-0AD7-4AEF-A618-C249C6E6568D:"
StatusCodePrefix is sent to the client to let it know the exit code is coming next
Variables ¶
var (
IndexOperationConcurrency = 128
)
var Logger = logger.New("ns=provider.aws")
Logger is a package-wide logger
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func ErrorNotFound ¶
ErrorNotFound returns true if the error is a "not found" type
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type AWSProvider ¶
type AWSProvider struct { Region string Endpoint string Access string Secret string Token string BuildCluster string Cluster string Development bool DockerImageAPI string DynamoBuilds string DynamoReleases string EncryptionKey string NotificationHost string NotificationTopic string Password string Rack string RegistryHost string SecurityGroup string SettingsBucket string Subnets string SubnetsPrivate string Vpc string VpcCidr string SkipCache bool }
func FromEnv ¶
func FromEnv() *AWSProvider
NewProviderFromEnv returns a new AWS provider from env vars
func (*AWSProvider) AppCancel ¶
func (p *AWSProvider) AppCancel(name string) error
func (*AWSProvider) AppDelete ¶
func (p *AWSProvider) AppDelete(name string) error
AppDelete deletes an app
func (*AWSProvider) AppGet ¶
func (p *AWSProvider) AppGet(name string) (*structs.App, error)
AppGet gets an app
func (*AWSProvider) BuildCreate ¶
func (p *AWSProvider) BuildCreate(app, method, url string, opts structs.BuildOptions) (*structs.Build, error)
func (*AWSProvider) BuildDelete ¶
func (p *AWSProvider) BuildDelete(app, id string) (*structs.Build, error)
BuildDelete deletes the build specified by id belonging to app Care should be taken as this could delete the build used by the active release
func (*AWSProvider) BuildExport ¶
func (p *AWSProvider) BuildExport(app, id string, w io.Writer) error
BuildExport exports a build artifact
func (*AWSProvider) BuildGet ¶
func (p *AWSProvider) BuildGet(app, id string) (*structs.Build, error)
func (*AWSProvider) BuildImport ¶
BuildImport imports a build artifact
func (*AWSProvider) BuildList ¶
BuildList returns a list of the latest builds, with the length specified in limit
func (*AWSProvider) BuildLogs ¶
func (p *AWSProvider) BuildLogs(app, id string, w io.Writer) error
BuildLogs streams the logs for a Build to an io.Writer
func (*AWSProvider) BuildRelease ¶
func (*AWSProvider) BuildSave ¶
func (p *AWSProvider) BuildSave(b *structs.Build) error
BuildSave creates or updates a build item in DynamoDB. It takes an optional bucket argument, which if set indicates to PUT Log data into S3
func (*AWSProvider) CapacityGet ¶
func (p *AWSProvider) CapacityGet() (*structs.Capacity, error)
CapacityGet returns individual server and total rack resources
func (*AWSProvider) CertificateCreate ¶
func (p *AWSProvider) CertificateCreate(pub, key, chain string) (*structs.Certificate, error)
func (*AWSProvider) CertificateDelete ¶
func (p *AWSProvider) CertificateDelete(id string) error
func (*AWSProvider) CertificateGenerate ¶
func (p *AWSProvider) CertificateGenerate(domains []string) (*structs.Certificate, error)
func (*AWSProvider) CertificateList ¶
func (p *AWSProvider) CertificateList() (structs.Certificates, error)
func (*AWSProvider) EnvironmentGet ¶
func (p *AWSProvider) EnvironmentGet(app string) (structs.Environment, error)
func (*AWSProvider) EventSend ¶
func (p *AWSProvider) EventSend(e *structs.Event, err error) error
EventSend publishes an important message out to the world.
On AWS messages are published to SNS. The Rack has an HTTP endpoint that is an SNS subscription, and when a message is delivered forwards them to all configured webhook services.
Often the Rack has a Console webhook which facilitates forwarding events to Slack with additional formatting and filtering.
Because these are important system events, they are also published to Segment for operational metrics.
func (*AWSProvider) FormationGet ¶
func (p *AWSProvider) FormationGet(app, process string) (*structs.ProcessFormation, error)
FormationGet gets a Formation
func (*AWSProvider) FormationList ¶
func (p *AWSProvider) FormationList(app string) (structs.Formation, error)
FormationList lists the Formation
func (*AWSProvider) FormationSave ¶
func (p *AWSProvider) FormationSave(app string, pf *structs.ProcessFormation) error
FormationSave saves a Formation
func (*AWSProvider) IndexDiff ¶
func (p *AWSProvider) IndexDiff(index *structs.Index) ([]string, error)
func (*AWSProvider) IndexDownload ¶
func (p *AWSProvider) IndexDownload(index *structs.Index, dir string) error
func (*AWSProvider) IndexUpload ¶
func (p *AWSProvider) IndexUpload(hash string, data []byte) error
func (*AWSProvider) Initialize ¶
func (p *AWSProvider) Initialize(opts structs.ProviderOptions) error
func (*AWSProvider) InstanceList ¶
func (p *AWSProvider) InstanceList() (structs.Instances, error)
func (*AWSProvider) InstanceTerminate ¶
func (p *AWSProvider) InstanceTerminate(id string) error
func (*AWSProvider) IsTest ¶
func (p *AWSProvider) IsTest() bool
IsTest returns true when we're in test mode
func (*AWSProvider) KeyDecrypt ¶
func (p *AWSProvider) KeyDecrypt(data []byte) ([]byte, error)
func (*AWSProvider) KeyEncrypt ¶
func (p *AWSProvider) KeyEncrypt(data []byte) ([]byte, error)
func (*AWSProvider) LogStream ¶
func (p *AWSProvider) LogStream(app string, w io.Writer, opts structs.LogStreamOptions) error
func (*AWSProvider) ObjectDelete ¶
func (p *AWSProvider) ObjectDelete(key string) error
func (*AWSProvider) ObjectExists ¶
func (p *AWSProvider) ObjectExists(key string) bool
func (*AWSProvider) ObjectFetch ¶
func (p *AWSProvider) ObjectFetch(key string) (io.ReadCloser, error)
ObjectFetch fetches an Object
func (*AWSProvider) ObjectList ¶
func (p *AWSProvider) ObjectList(prefix string) ([]string, error)
func (*AWSProvider) ObjectStore ¶
func (p *AWSProvider) ObjectStore(key string, r io.Reader, opts structs.ObjectOptions) (string, error)
ObjectStore stores an Object
func (*AWSProvider) ProcessExec ¶
func (p *AWSProvider) ProcessExec(app, pid, command string, stream io.ReadWriter, opts structs.ProcessExecOptions) error
ProcessExec runs a command in an existing Process
func (*AWSProvider) ProcessGet ¶
func (p *AWSProvider) ProcessGet(app, pid string) (*structs.Process, error)
ProcessGet returns the specified process for an app
func (*AWSProvider) ProcessList ¶
func (p *AWSProvider) ProcessList(app string) (structs.Processes, error)
ProcessList returns a list of processes for an app
func (*AWSProvider) ProcessRun ¶
func (p *AWSProvider) ProcessRun(app, process string, opts structs.ProcessRunOptions) (string, error)
ProcessRun runs a new Process
func (*AWSProvider) ProcessStop ¶
func (p *AWSProvider) ProcessStop(app, pid string) error
ProcessStop stops a Process
func (*AWSProvider) RegistryAdd ¶
func (p *AWSProvider) RegistryAdd(server, username, password string) (*structs.Registry, error)
func (*AWSProvider) RegistryDelete ¶
func (p *AWSProvider) RegistryDelete(server string) error
func (*AWSProvider) RegistryList ¶
func (p *AWSProvider) RegistryList() (structs.Registries, error)
func (*AWSProvider) ReleaseDelete ¶
func (p *AWSProvider) ReleaseDelete(app, buildID string) error
ReleaseDelete will delete all releases that belong to app and buildID This could includes the active release which implies this should be called with caution.
func (*AWSProvider) ReleaseGet ¶
func (p *AWSProvider) ReleaseGet(app, id string) (*structs.Release, error)
ReleaseGet returns a release
func (*AWSProvider) ReleaseList ¶
ReleaseList returns a list of the latest releases, with the length specified in limit
func (*AWSProvider) ReleasePromote ¶
func (p *AWSProvider) ReleasePromote(r *structs.Release) error
ReleasePromote promotes a release
func (*AWSProvider) ReleaseSave ¶
func (p *AWSProvider) ReleaseSave(r *structs.Release) error
ReleaseSave saves a Release
func (*AWSProvider) ResourceCreate ¶
func (p *AWSProvider) ResourceCreate(name, kind string, params map[string]string) (*structs.Resource, error)
ResourceCreate creates a new resource. Note: see also createResource() below.
func (*AWSProvider) ResourceDelete ¶
func (p *AWSProvider) ResourceDelete(name string) (*structs.Resource, error)
ResourceDelete deletes a resource.
func (*AWSProvider) ResourceGet ¶
func (p *AWSProvider) ResourceGet(name string) (*structs.Resource, error)
ResourceGet retrieves a resource.
func (*AWSProvider) ResourceLink ¶
func (p *AWSProvider) ResourceLink(name, app, process string) (*structs.Resource, error)
ResourceLink creates a link between the provided app and resource.
func (*AWSProvider) ResourceList ¶
func (p *AWSProvider) ResourceList() (structs.Resources, error)
ResourceList lists the resources.
func (*AWSProvider) ResourceUnlink ¶
func (p *AWSProvider) ResourceUnlink(name, app, process string) (*structs.Resource, error)
ResourceUnlink removes a link between the provided app and resource.
func (*AWSProvider) ResourceUpdate ¶
func (p *AWSProvider) ResourceUpdate(name string, params map[string]string) (*structs.Resource, error)
ResourceUpdate updates a resource with new params.
func (*AWSProvider) SystemLogs ¶
func (p *AWSProvider) SystemLogs(w io.Writer, opts structs.LogStreamOptions) error
SystemLogs streams logs for the Rack
func (*AWSProvider) SystemProcesses ¶
func (p *AWSProvider) SystemProcesses(opts structs.SystemProcessesOptions) (structs.Processes, error)
func (*AWSProvider) SystemReleases ¶
func (p *AWSProvider) SystemReleases() (structs.Releases, error)
SystemReleases lists the latest releases of the rack
func (*AWSProvider) SystemSave ¶
func (p *AWSProvider) SystemSave(system structs.System) error
type CfsslCertificateBundle ¶
type CfsslCertificateBundle struct {
Bundle string `json:"bundle"`
}
type CfsslError ¶
func (CfsslError) Error ¶
func (e CfsslError) Error() string
type ECSServices ¶
type NoSuchBuild ¶
type NoSuchBuild string
NoSuchBuild means the requested build id was not found
func (NoSuchBuild) Error ¶
func (id NoSuchBuild) Error() string
Error satisfies the Error interface and formats the return error goven id
type Template ¶
type Template struct {
Parameters map[string]TemplateParameter
}