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 AutoScaling() *autoscaling.AutoScaling
- func AwsCamelize(dasherized string) string
- func CFParams(source map[string]string) map[string]string
- func CloudFormation() *cloudformation.CloudFormation
- func CloudWatch() *cloudwatch.CloudWatch
- func CloudWatchLogs() *cloudwatchlogs.CloudWatchLogs
- func DashName(name string) string
- func Docker(host string) (*docker.Client, error)
- func DockerHost() (string, error)
- func DockerLogin(ac docker.AuthConfiguration) error
- func DockerLogout(ac docker.AuthConfiguration) error
- func DynamoDB() *dynamodb.DynamoDB
- func EC2() *ec2.EC2
- func ECR() *ecr.ECR
- func ECS() *ecs.ECS
- func ELB() *elb.ELB
- func GetAppServices(app string) ([]*ecs.Service, error)
- func IAM() *iam.IAM
- func InstanceKeyroll() error
- func InstanceSSH(id, command, term string, height, width int, rw io.ReadWriter) error
- func KernelUpdate() error
- func Kinesis() *kinesis.Kinesis
- func LoginRegistries() error
- func MustAsset(name string) []byte
- func Notify(name, status string, data map[string]string) error
- func NotifyError(action string, err error, data map[string]string) error
- func NotifySuccess(action string, data map[string]string) error
- func PutEnvironment(app string, env Environment) (string, error)
- func PutRackSettings(env Environment) error
- func RDS() *rds.RDS
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func S3() *s3.S3
- func S3Put(bucket, key string, data []byte, public bool) error
- func S3PutFile(bucket, key string, f io.ReadSeeker, public bool) error
- func SNS() *sns.SNS
- func SQS() *sqs.SQS
- func SetFormation(app, process, count, memory string) error
- func SettingGet(name string) (string, error)
- func SettingSet(name, value string) error
- func UpperName(name string) string
- type App
- func (a *App) BalancerHost() string
- func (a *App) BalancerPorts(ps string) map[string]string
- func (a *App) Builds() Builds
- func (a *App) Cleanup() error
- func (a *App) Create() error
- func (a *App) Created() bool
- func (a *App) Delete() error
- func (a *App) Deployments() Deployments
- func (a *App) ELBReady() bool
- func (a *App) ExecAttached(pid, command string, rw io.ReadWriter) error
- func (a *App) ForkRelease() (*Release, error)
- func (a *App) Formation() (string, error)
- func (a *App) HealthCheck() string
- func (a *App) HealthCheckEndpoint() string
- func (a *App) HealthCheckEndpoints() []string
- func (a *App) HealthCheckPath() string
- func (a *App) LatestRelease() (*Release, error)
- func (a *App) Metrics() *Metrics
- func (a *App) ProcessPorts(ps string) map[string]string
- func (a *App) Processes() Processes
- func (a *App) Releases() Releases
- func (a *App) Resources() Resources
- func (a *App) RunAttached(process, command string, rw io.ReadWriter) error
- func (a *App) RunDetached(process, command string) error
- func (a *App) SubscribeLogs(output chan []byte, quit chan bool) error
- func (a *App) TaskDefinitionFamily() string
- func (a *App) UpdateParams(changes map[string]string) error
- func (a *App) UpdateParamsAndTemplate(changes map[string]string, template string) error
- type Apps
- type Build
- func (b *Build) Cleanup() error
- func (b *Build) ECRLogin() (string, error)
- func (b *Build) ExecuteLocal(r io.Reader, cache bool, config string, ch chan error)
- func (b *Build) ExecuteRemote(repo string, cache bool, config string, ch chan error)
- func (b *Build) Fail(err error)
- func (b *Build) Image(process string) string
- func (b *Build) IsRunning() bool
- func (b *Build) Save() error
- type Builds
- type CfsslCertificateBundle
- type Deployment
- type Deployments
- type ECSEvents
- type ECSServices
- type Environment
- type Formation
- type FormationEntry
- type Instance
- type InstanceResource
- type Manifest
- func (m Manifest) BalancerResourceName(process string) string
- func (m Manifest) Balancers() []ManifestBalancer
- func (m Manifest) Entry(name string) *ManifestEntry
- func (m Manifest) EntryNames() []string
- func (m Manifest) Formation() (string, error)
- func (m Manifest) GetBalancer(name string) *ManifestBalancer
- func (m Manifest) HasExternalPorts() bool
- func (m Manifest) HasProcesses() bool
- type ManifestBalancer
- func (mb ManifestBalancer) ExternalPorts() []string
- func (mb ManifestBalancer) FirstPort() string
- func (mb ManifestBalancer) InternalPorts() []string
- func (mb ManifestBalancer) LoadBalancerName() template.HTML
- func (mb ManifestBalancer) PortMappings() []ManifestPort
- func (mb ManifestBalancer) Ports() []string
- func (mb ManifestBalancer) ProcessName() string
- func (mb ManifestBalancer) Randoms() map[string]int
- func (mb ManifestBalancer) ResourceName() string
- func (mb ManifestBalancer) Scheme() string
- type ManifestEntries
- type ManifestEntry
- func (me *ManifestEntry) BalancerResourceName() string
- func (me *ManifestEntry) CommandString() string
- func (me ManifestEntry) ContainerPorts() []string
- func (me ManifestEntry) EnvMap() map[string]string
- func (me ManifestEntry) ExternalPorts() []string
- func (me ManifestEntry) HasBalancer() bool
- func (me ManifestEntry) InternalPorts() []string
- func (me ManifestEntry) MountableVolumes() []string
- func (me ManifestEntry) PortMappings() []ManifestPort
- func (me ManifestEntry) Randoms() map[string]int
- type ManifestPort
- type Metrics
- type Process
- type Processes
- type Release
- type Releases
- type Resource
- type Resources
- type SSL
- type SSLs
- type Service
- func (s *Service) Create() error
- func (s *Service) CreateDatastore() (*cloudformation.CreateStackInput, error)
- func (s *Service) CreatePapertrail() (*cloudformation.CreateStackInput, error)
- func (s *Service) CreateWebhook() (*cloudformation.CreateStackInput, error)
- func (s *Service) Delete() error
- func (s *Service) Formation() (string, error)
- func (s *Service) LinkPapertrail(app App) error
- func (s *Service) SubscribeLogs(output chan []byte, quit chan bool) error
- func (s *Service) UnlinkPapertrail(app App) error
- func (s *Service) UpdatePapertrail(arns map[string]string) error
- type Services
- type System
- type Template
- type TemplateParameter
- type Transaction
- type Transactions
Constants ¶
const KERNEL_URL = "https://convox.s3.amazonaws.com/kernel.json"
Variables ¶
var CustomTopic = os.Getenv("CUSTOM_TOPIC")
var DEPLOYMENT_TIMEOUT = 10 * time.Minute
var ErrPending = errors.New("can not get docker client for non-running container")
var ManifestRandomPorts = true
set to false when testing for deterministic ports
var NotificationHost = os.Getenv("NOTIFICATION_HOST")
var NotificationTopic = os.Getenv("NOTIFICATION_TOPIC")
var PauseNotifications = false
var SortableTime = "20060102.150405.000000000"
var StatusCodePrefix = client.StatusCodePrefix
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 AutoScaling ¶
func AutoScaling() *autoscaling.AutoScaling
func AwsCamelize ¶
func CFParams ¶
turns a dasherized map of key/value CLI params to parameters that CloudFormation expects
func CloudFormation ¶
func CloudFormation() *cloudformation.CloudFormation
func CloudWatch ¶
func CloudWatch() *cloudwatch.CloudWatch
func CloudWatchLogs ¶
func CloudWatchLogs() *cloudwatchlogs.CloudWatchLogs
func DockerHost ¶
func DockerLogin ¶
func DockerLogin(ac docker.AuthConfiguration) error
func DockerLogout ¶
func DockerLogout(ac docker.AuthConfiguration) error
func InstanceKeyroll ¶
func InstanceKeyroll() error
func InstanceSSH ¶
func InstanceSSH(id, command, term string, height, width int, rw io.ReadWriter) error
func KernelUpdate ¶
func KernelUpdate() error
func LoginRegistries ¶
func LoginRegistries() error
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func NotifyError ¶
uniform error handling
func PutEnvironment ¶
func PutEnvironment(app string, env Environment) (string, error)
func PutRackSettings ¶
func PutRackSettings(env Environment) error
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
func SetFormation ¶
func SettingGet ¶
func SettingSet ¶
Types ¶
type App ¶
type App struct {
Name string `json:"name"`
Release string `json:"release"`
Status string `json:"status"`
Outputs map[string]string `json:"-"`
Parameters map[string]string `json:"-"`
Tags map[string]string `json:"-"`
}
func (*App) BalancerHost ¶
func (*App) Deployments ¶
func (a *App) Deployments() Deployments
func (*App) ExecAttached ¶
func (a *App) ExecAttached(pid, command string, rw io.ReadWriter) error
func (*App) ForkRelease ¶
func (*App) HealthCheck ¶
func (*App) HealthCheckEndpoint ¶
func (*App) HealthCheckEndpoints ¶
func (*App) HealthCheckPath ¶
func (*App) LatestRelease ¶
func (*App) RunAttached ¶
func (a *App) RunAttached(process, command string, rw io.ReadWriter) error
func (*App) RunDetached ¶
func (*App) SubscribeLogs ¶
During the transition from Kinesis to CloudWatch Logs, apps might not have been re-deployed and provisioned a LogGroup. Conditionally fall back to reading from Kinesis in this case.
func (*App) TaskDefinitionFamily ¶
type Build ¶
type Build struct {
Id string `json:"id"`
App string `json:"app"`
Logs string `json:"logs"`
Manifest string `json:"manifest"`
Release string `json:"release"`
Status string `json:"status"`
Started time.Time `json:"started"`
Ended time.Time `json:"ended"`
// contains filtered or unexported fields
}
func (*Build) ExecuteLocal ¶
func (*Build) ExecuteRemote ¶
func (*Build) IsRunning ¶
Test if another build container is running. This is a temporary workaround since the current Docker Registry does not handle pushing multiple images at the same time. Course grained locking will prevent subtle build errors until a better registry and/or Docker image subsystem is integrated
type CfsslCertificateBundle ¶
type CfsslCertificateBundle struct {
Bundle string `json:"bundle"`
}
type Deployment ¶
type Deployments ¶
type Deployments []Deployment
func ListDeployments ¶
func ListDeployments(app string) (Deployments, error)
type ECSEvents ¶
type ECSEvents []*ecs.ServiceEvent
func (ECSEvents) CapacityWarning ¶
func (ECSEvents) HasCapacityWarning ¶
type ECSServices ¶
func ClusterServices ¶
func ClusterServices() (ECSServices, error)
func (ECSServices) EventsSince ¶
func (services ECSServices) EventsSince(since time.Time) ECSEvents
func (ECSServices) IsConverged ¶
func (services ECSServices) IsConverged() bool
func (ECSServices) LastEvent ¶
func (services ECSServices) LastEvent() ecs.ServiceEvent
type Environment ¶
func GetEnvironment ¶
func GetEnvironment(app string) (Environment, error)
func GetRackSettings ¶
func GetRackSettings() (Environment, error)
Use the Rack Settings bucket and EncryptionKey KMS key to store and retrieve sensitive credentials, just like app env
func GetRegistriesAuth ¶
func GetRegistriesAuth() (Environment, docker.AuthConfigurations119, error)
func LoadEnvironment ¶
func LoadEnvironment(data []byte) Environment
func (Environment) Raw ¶
func (e Environment) Raw() string
func (Environment) SortedNames ¶
func (e Environment) SortedNames() []string
type Formation ¶
type Formation []FormationEntry
func ListFormation ¶
func (Formation) Entry ¶
func (f Formation) Entry(name string) *FormationEntry
type FormationEntry ¶
type Instance ¶
type Instance struct {
Agent bool `json:"agent"`
Cpu float64 `json:"cpu"`
Id string `json:"id"`
Ip string `json:"ip"`
Memory float64 `json:"memory"`
Processes int `json:"processes"`
Status string `json:"status"`
Started time.Time `json:"started"`
}
func ListInstances ¶
type InstanceResource ¶
type InstanceResource struct {
Total int `json:"total"`
Free int `json:"free"`
Used int `json:"used"`
}
func (InstanceResource) PercentUsed ¶
func (ir InstanceResource) PercentUsed() float64
type Manifest ¶
type Manifest []ManifestEntry
func LoadManifest ¶
func (Manifest) BalancerResourceName ¶
func (Manifest) Balancers ¶
func (m Manifest) Balancers() []ManifestBalancer
func (Manifest) Entry ¶
func (m Manifest) Entry(name string) *ManifestEntry
func (Manifest) EntryNames ¶
func (Manifest) GetBalancer ¶
func (m Manifest) GetBalancer(name string) *ManifestBalancer
func (Manifest) HasExternalPorts ¶
func (Manifest) HasProcesses ¶
type ManifestBalancer ¶
type ManifestBalancer struct {
Entry ManifestEntry
Public bool
}
func (ManifestBalancer) ExternalPorts ¶
func (mb ManifestBalancer) ExternalPorts() []string
func (ManifestBalancer) FirstPort ¶
func (mb ManifestBalancer) FirstPort() string
func (ManifestBalancer) InternalPorts ¶
func (mb ManifestBalancer) InternalPorts() []string
func (ManifestBalancer) LoadBalancerName ¶
func (mb ManifestBalancer) LoadBalancerName() template.HTML
func (ManifestBalancer) PortMappings ¶
func (mb ManifestBalancer) PortMappings() []ManifestPort
func (ManifestBalancer) Ports ¶
func (mb ManifestBalancer) Ports() []string
func (ManifestBalancer) ProcessName ¶
func (mb ManifestBalancer) ProcessName() string
func (ManifestBalancer) Randoms ¶
func (mb ManifestBalancer) Randoms() map[string]int
func (ManifestBalancer) ResourceName ¶
func (mb ManifestBalancer) ResourceName() string
func (ManifestBalancer) Scheme ¶
func (mb ManifestBalancer) Scheme() string
type ManifestEntries ¶
type ManifestEntries map[string]ManifestEntry
type ManifestEntry ¶
type ManifestEntry struct {
Name string
Build string `yaml:"build"`
Command interface{} `yaml:"command"`
Env []string `yaml:"environment"`
Exports map[string]string `yaml:"-"`
Image string `yaml:"image"`
Links []string `yaml:"links"`
LinkVars map[string]template.HTML `yaml:"-"`
Ports []string `yaml:"ports"`
Volumes []string `yaml:"volumes"`
// contains filtered or unexported fields
}
func (*ManifestEntry) BalancerResourceName ¶
func (me *ManifestEntry) BalancerResourceName() string
func (*ManifestEntry) CommandString ¶
func (me *ManifestEntry) CommandString() string
func (ManifestEntry) ContainerPorts ¶
func (me ManifestEntry) ContainerPorts() []string
func (ManifestEntry) EnvMap ¶
func (me ManifestEntry) EnvMap() map[string]string
func (ManifestEntry) ExternalPorts ¶
func (me ManifestEntry) ExternalPorts() []string
func (ManifestEntry) HasBalancer ¶
func (me ManifestEntry) HasBalancer() bool
func (ManifestEntry) InternalPorts ¶
func (me ManifestEntry) InternalPorts() []string
func (ManifestEntry) MountableVolumes ¶
func (me ManifestEntry) MountableVolumes() []string
func (ManifestEntry) PortMappings ¶
func (me ManifestEntry) PortMappings() []ManifestPort
func (ManifestEntry) Randoms ¶
func (me ManifestEntry) Randoms() map[string]int
type ManifestPort ¶
type Process ¶
type Process struct {
Id string `json:"id"`
App string `json:"app"`
Command string `json:"command"`
Host string `json:"host"`
Image string `json:"image"`
Name string `json:"name"`
Ports []string `json:"ports"`
Release string `json:"release"`
Size int64 `json:"size"`
Cpu float64 `json:"cpu"`
Memory float64 `json:"memory"`
Started time.Time `json:"started"`
// contains filtered or unexported fields
}
func GetProcess ¶
func (*Process) FetchStats ¶
func (*Process) FetchStatsAsync ¶
type Processes ¶
type Processes []Process
func ListOneoffProcesses ¶
func ListPendingProcesses ¶
func ListProcesses ¶
type Release ¶
type Release struct {
Id string `json:"id"`
App string `json:"app"`
Build string `json:"build"`
Env string `json:"env"`
Manifest string `json:"manifest"`
Created time.Time `json:"created"`
}
func GetRelease ¶
func NewRelease ¶
func (*Release) EnvironmentUrl ¶
type Resources ¶
func ListResources ¶
type SSL ¶
type SSL struct {
Expiration time.Time `json:"expiration"`
Domain string `json:"domain"`
Process string `json:"process"`
Port int `json:"port"`
Secure bool `json:"secure"`
}
type Service ¶
func GetService ¶
func (*Service) CreateDatastore ¶
func (s *Service) CreateDatastore() (*cloudformation.CreateStackInput, error)
func (*Service) CreatePapertrail ¶
func (s *Service) CreatePapertrail() (*cloudformation.CreateStackInput, error)
func (*Service) CreateWebhook ¶
func (s *Service) CreateWebhook() (*cloudformation.CreateStackInput, error)
func (*Service) LinkPapertrail ¶
func (*Service) SubscribeLogs ¶
func (*Service) UnlinkPapertrail ¶
type Template ¶
type Template struct {
Parameters map[string]TemplateParameter
}
type TemplateParameter ¶
type Transaction ¶
A Transaction groups more than one event on a Name/Type resource
type Transactions ¶
type Transactions []Transaction
func (Transactions) Len ¶
func (slice Transactions) Len() int
func (Transactions) Less ¶
func (slice Transactions) Less(i, j int) bool
func (Transactions) Swap ¶
func (slice Transactions) Swap(i, j int)
Source Files
¶
- app.go
- build.go
- cluster.go
- deployment.go
- docker.go
- environment.go
- formation.go
- helpers.go
- instances.go
- kernel.go
- logs.go
- manifest.go
- metrics.go
- models.go
- notify.go
- process.go
- registry.go
- release.go
- resource.go
- service-datastore.go
- service-papertrail.go
- service-webhook.go
- service.go
- settings.go
- ssl.go
- system.go
- templates.go
- transaction.go