structs

package
v0.0.0-...-218c583 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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:"-"`
}

func (*App) IsBound

func (a *App) IsBound() bool

IsBound checks if the app is bound returns true if it is, false otherwise If an app has a "Name" tag, it's considered bound

func (*App) StackName

func (a *App) StackName() string

StackName returns the app's stack if the app is bound. Otherwise returns the short name.

type Apps

type Apps []App

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:"-"`
}

func NewBuild

func NewBuild(app string) *Build

type BuildOptions

type BuildOptions struct {
	Cache       bool
	Config      string
	Description string
}

type Builds

type Builds []Build

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 Certificate struct {
	Id         string    `json:"id"`
	Domain     string    `json:"domain"`
	Expiration time.Time `json:"expiration"`
}

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

type Environment map[string]string

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 Formation

type Formation []ProcessFormation

Formation represents the formation for an App

type Index

type Index map[string]IndexItem

type IndexItem

type IndexItem struct {
	Name    string      `json:"name"`
	Mode    os.FileMode `json:"mode"`
	ModTime time.Time   `json:"mtime"`
}

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 (i *Instance) DockerClient() (*docker.Client, error)

func (*Instance) DockerHost

func (i *Instance) DockerHost() string

func (*Instance) Ip

func (i *Instance) Ip() string

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 Instances

type Instances []Instance

type LogStreamOptions

type LogStreamOptions struct {
	Filter string
	Follow bool
	Since  time.Time
}

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

type ProcessExecOptions struct {
	Height int
	Width  int
}

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

func (Processes) Len

func (ps Processes) Len() int

func (Processes) Less

func (ps Processes) Less(i, j int) bool

Sort processes by name and id Processes with a 'pending' id will naturally come last by design

func (Processes) Swap

func (ps Processes) Swap(i, j int)

type ProviderOptions

type ProviderOptions struct {
	LogOutput io.Writer
}

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 Registry

type Registry struct {
	Server   string `json:"server"`
	Username string `json:"username"`
	Password string `json:"password"`
}

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 NewRelease

func NewRelease(app string) *Release

NewRelease creates a new release

type Releases

type Releases []Release

func (Releases) Latest

func (rs Releases) Latest() *Release

Latest returns the latest release determined by the date created.

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 Resources

type Resources []Resource

Resources is a list of resources.

type System

type System struct {
	Count             int    `json:"count"`
	Name              string `json:"name"`
	Region            string `json:"region"`
	Status            string `json:"status"`
	Type              string `json:"type"`
	Version           string `json:"version"`
	BuildInstanceType string `json:"buildinstance"`
}

type SystemProcessesOptions

type SystemProcessesOptions struct {
	All bool
}

Jump to

Keyboard shortcuts

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