container

package
v0.0.0-...-0cf49f2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2015 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BsSysLogPort

func BsSysLogPort() int

func SafeAttachWaitContainer

func SafeAttachWaitContainer(p DockerProvisioner, opts docker.AttachToContainerOptions) (int, error)

Types

type AppLocker

type AppLocker interface {
	Lock(appName string) bool
	Unlock(appName string)
}

type Container

type Container struct {
	ID                      string
	AppName                 string
	ProcessName             string
	Type                    string
	IP                      string
	HostAddr                string
	HostPort                string
	PrivateKey              string
	Status                  string
	Version                 string
	Image                   string
	Name                    string
	User                    string
	BuildingImage           string
	LastStatusUpdate        time.Time
	LastSuccessStatusUpdate time.Time
	LockedUntil             time.Time
	Routable                bool `bson:"-"`
}

func (*Container) Address

func (c *Container) Address() *url.URL

func (*Container) AsUnit

func (c *Container) AsUnit(a provision.App) provision.Unit

func (*Container) Available

func (c *Container) Available() bool

func (*Container) Commit

func (c *Container) Commit(p DockerProvisioner, writer io.Writer) (string, error)

Commits commits the container, creating an image in Docker. It then returns the image identifier for usage in future container creation.

func (*Container) Create

func (c *Container) Create(args *CreateArgs) error

func (*Container) Exec

func (c *Container) Exec(p DockerProvisioner, stdout, stderr io.Writer, cmd string, args ...string) error

func (*Container) Logs

func (c *Container) Logs(p DockerProvisioner, w io.Writer) (int, error)

func (*Container) NetworkInfo

func (c *Container) NetworkInfo(p DockerProvisioner) (NetworkInfo, error)

func (*Container) Remove

func (c *Container) Remove(p DockerProvisioner) error

func (*Container) SetImage

func (c *Container) SetImage(p DockerProvisioner, imageId string) error

func (*Container) SetStatus

func (c *Container) SetStatus(p DockerProvisioner, status string, updateDB bool) error

func (*Container) Shell

func (c *Container) Shell(p DockerProvisioner, stdin io.Reader, stdout, stderr io.Writer, pty Pty) error

func (*Container) ShortID

func (c *Container) ShortID() string

func (*Container) Start

func (c *Container) Start(args *StartArgs) error

func (*Container) Stop

func (c *Container) Stop(p DockerProvisioner) error

type CreateArgs

type CreateArgs struct {
	ImageID          string
	Commands         []string
	App              provision.App
	Deploy           bool
	Provisioner      DockerProvisioner
	DestinationHosts []string
	ProcessName      string
}

type DockerProvisioner

type DockerProvisioner interface {
	Cluster() *cluster.Cluster
	Collection() *storage.Collection
	PushImage(name, tag string) error
}

type NetworkInfo

type NetworkInfo struct {
	HTTPHostPort string
	IP           string
}

type Pty

type Pty struct {
	Width  int
	Height int
	Term   string
}

type StartArgs

type StartArgs struct {
	Provisioner DockerProvisioner
	App         provision.App
	Deploy      bool
}

Jump to

Keyboard shortcuts

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