model

package
v0.0.0-...-85b3d98 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Repository string
	Username   string
	AppName    string
	// contains filtered or unexported fields
}

func ApplicationFromArgs

func ApplicationFromArgs(args []string, etcd *store.Etcd) (*Application, error)

args:

user/app, 19fb23cd71a4cf2eab00ad1a393e40de4ed61531, user, 4c:1f:92:b9:43:2b:23:0b:c0:e8:ab:12:cd:34:ef:56, refs/heads/branch-name

func (*Application) BuildArgs

func (app *Application) BuildArgs() (map[string]string, error)

func (*Application) DeleteDeployment

func (app *Application) DeleteDeployment(deployment string) error

func (*Application) Deployments

func (app *Application) Deployments() (map[string]string, error)

func (*Application) DirExists

func (app *Application) DirExists() bool

func (*Application) EnvironmentVariables

func (app *Application) EnvironmentVariables() (map[string]string, error)

func (*Application) HealthCheck

func (app *Application) HealthCheck() (string, int, int, error)

func (*Application) RegisterMetadata

func (app *Application) RegisterMetadata(revision, timestamp string) error

type Compose

type Compose struct {
	ComposeFilePath string
	ProjectName     string
	// contains filtered or unexported fields
}

func NewCompose

func NewCompose(dockerHost, composeFilePath, projectName string) (*Compose, error)

func (*Compose) Build

func (c *Compose) Build() error

func (*Compose) GetContainerID

func (c *Compose) GetContainerID(service string) (string, error)

func (*Compose) InjectBuildArgs

func (c *Compose) InjectBuildArgs(buildArgs map[string]string)

func (*Compose) InjectEnvironmentVariables

func (c *Compose) InjectEnvironmentVariables(envs map[string]string)

func (*Compose) Pull

func (c *Compose) Pull() error

func (*Compose) RewritePortBindings

func (c *Compose) RewritePortBindings()

func (*Compose) SaveAs

func (c *Compose) SaveAs(filePath string) error

func (*Compose) Stop

func (c *Compose) Stop() error

func (*Compose) Up

func (c *Compose) Up() error

type ComposeConfig

type ComposeConfig struct {
	Version  string                           `yaml:"version,omitempty"`
	Services map[string]*config.ServiceConfig `yaml:"services,omitempty"`
	Volumes  map[string]*config.VolumeConfig  `yaml:"volumes,omitempty"`
	Networks map[string]*config.NetworkConfig `yaml:"networks,omitempty"`
}

type Container

type Container struct {
	ContainerId string
	// contains filtered or unexported fields
}

func ContainerFromID

func ContainerFromID(dockerHost, containerId string) (*Container, error)

func (*Container) ExecuteHealthCheck

func (c *Container) ExecuteHealthCheck(path string, interval, maxTry int, callback HealthCheckFunc) bool

func (*Container) HostIP

func (c *Container) HostIP() string

func (*Container) HostPort

func (c *Container) HostPort() string

type Deployment

type Deployment struct {
	App             *Application
	Branch          string
	ComposeFilePath string
	ProjectName     string
	Revision        string
	Timestamp       string
}

func DeploymentFromArgs

func DeploymentFromArgs(app *Application, args []string, timestamp, repositoryDir string) (*Deployment, error)

args:

user/app, 19fb23cd71a4cf2eab00ad1a393e40de4ed61531, user, 4c:1f:92:b9:43:2b:23:0b:c0:e8:ab:12:cd:34:ef:56, refs/heads/branch-name

func NewDeployment

func NewDeployment(app *Application, branch, revision, timestamp, repositoryDir string) *Deployment

func (*Deployment) Register

func (d *Deployment) Register() error

type HealthCheckFunc

type HealthCheckFunc func(path string, try int)

Jump to

Keyboard shortcuts

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