Documentation
¶
Index ¶
- type App
- type Apps
- type Build
- type BuildOptions
- type Builds
- type Capacity
- type Certificate
- type Certificates
- type Environment
- type Event
- type Formation
- type Index
- type IndexItem
- type Instance
- type InstanceResource
- type Instances
- type LogStreamOptions
- type ObjectOptions
- type Process
- type ProcessExecOptions
- type ProcessFormation
- type ProcessRunOptions
- type Processes
- type ProviderOptions
- type Registries
- type Registry
- type Release
- type Releases
- type Resource
- type Resources
- type System
- type SystemProcessesOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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:"-"`
}
type Build ¶
type Build struct {
Id string `json:"id"`
App string `json:"app"`
Description string `json:"description"`
Logs string `json:"logs"`
Manifest string `json:"manifest"`
Release string `json:"release"`
Reason string `json:"reason"`
Status string `json:"status"`
Started time.Time `json:"started"`
Ended time.Time `json:"ended"`
Tags map[string]string `json:"-"`
}
type BuildOptions ¶
type Capacity ¶
type Capacity struct {
ClusterCPU int64 `json:"cluster-cpu"`
ClusterMemory int64 `json:"cluster-memory"`
InstanceCPU int64 `json:"instance-cpu"`
InstanceMemory int64 `json:"instance-memory"`
ProcessCount int64 `json:"process-count"`
ProcessCPU int64 `json:"process-cpu"`
ProcessMemory int64 `json:"process-memory"`
ProcessWidth int64 `json:"process-width"`
}
type Certificate ¶
type Certificates ¶
type Certificates []Certificate
func (Certificates) Len ¶
func (c Certificates) Len() int
func (Certificates) Less ¶
func (c Certificates) Less(i, j int) bool
func (Certificates) Swap ¶
func (c Certificates) Swap(i, j int)
type Environment ¶
Environment is of type map used to store environment variables.
func (Environment) List ¶
func (e Environment) List() []string
List retuns a string slic of environment variables. e.g ["KEY=VALUE"]
func (Environment) LoadEnvironment ¶
func (e Environment) LoadEnvironment(data []byte) Environment
LoadEnvironment sets the environment from data.
func (Environment) LoadRaw ¶
func (e Environment) LoadRaw(raw string)
LoadRaw reads a raw string (key/values separated by a newline) to load environment variables
func (Environment) Raw ¶
func (e Environment) Raw() string
Raw returns the environment variables as one string separated by a newline.
func (Environment) SortedNames ¶
func (e Environment) SortedNames() []string
SortedNames returns a slice of environment variables sorted by name.
type Event ¶
type Event struct {
Action string `json:"action"` // app:create, release:create, release:promote, etc.
Status string `json:"status"` // success or error
Data map[string]string `json:"data"` // {"rack": "example-rack", "app": "example-app", "id": "R123456789", "message": "unable to load release"}
Timestamp time.Time `json:"timestamp"`
}
type Instance ¶
type Instance struct {
Agent bool `json:"agent"`
Cpu float64 `json:"cpu"`
Id string `json:"id"`
Memory float64 `json:"memory"`
PrivateIp string `json:"private-ip"`
Processes int `json:"processes"`
PublicIp string `json:"public-ip"`
Status string `json:"status"`
Started time.Time `json:"started"`
}
func (*Instance) DockerClient ¶
func (*Instance) DockerHost ¶
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 ObjectOptions ¶
type ObjectOptions struct {
Public bool
}
type Process ¶
type Process struct {
ID string `json:"id"`
App string `json:"app"`
Name string `json:"name"`
Release string `json:"release"`
Command string `json:"command"`
Host string `json:"host"`
Image string `json:"image"`
Instance string `json:"instance"`
Ports []string `json:"ports"`
CPU float64 `json:"cpu"`
Memory float64 `json:"memory"`
Started time.Time `json:"started"`
}
Process represents a running Process
type ProcessExecOptions ¶
ProcessExecOptions are options for ProcessExec
type ProcessFormation ¶
type ProcessFormation struct {
Balancer string `json:"balancer"`
Name string `json:"name"`
Count int `json:"count"`
Memory int `json:"memory"`
CPU int `json:"cpu"`
Ports []int `json:"ports"`
}
ProcessFormation represents the formation for a Process
type ProcessRunOptions ¶
type ProcessRunOptions struct {
Command string
Height int
Width int
Release string
Stream io.ReadWriter
}
ProcessRunOptions are options for ProcessRun
type Processes ¶
type Processes []Process
Processes are a list of Processes
type ProviderOptions ¶
type Registries ¶
type Registries []Registry
func (Registries) Len ¶
func (r Registries) Len() int
func (Registries) Less ¶
func (r Registries) Less(i, j int) bool
func (Registries) Swap ¶
func (r Registries) Swap(i, j int)
type Release ¶
type Resource ¶
type Resource struct {
Name string `json:"name"`
Stack string `json:"-"`
Status string `json:"status"`
StatusReason string `json:"status-reason"`
Type string `json:"type"`
Apps Apps `json:"apps"`
Exports map[string]string `json:"exports"`
Outputs map[string]string `json:"-"`
Parameters map[string]string `json:"-"`
Tags map[string]string `json:"-"`
}
Resource is a dependency of an app that communicates with it over the network. Documentation: https://convox.com/docs/about-resources/
type SystemProcessesOptions ¶
type SystemProcessesOptions struct {
All bool
}