container

package
v0.0.0-...-b52e348 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeAttachWaitContainer

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

Types

type Container

type Container struct {
	Id                      string //container id.
	BoxId                   string
	AccountId               string
	CartonId                string
	Name                    string
	BoxName                 string
	Level                   provision.BoxLevel
	PublicIp                string
	HostAddr                string
	HostPort                string
	PrivateKey              string
	Version                 string
	Image                   string
	Status                  utils.Status
	State                   utils.State
	BuildingImage           string
	LastStatusUpdate        time.Time
	LastSuccessStatusUpdate time.Time
	LockedUntil             time.Time
	Routable                bool
	Region                  string
	// contains filtered or unexported fields
}

func (*Container) Address

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

func (*Container) Available

func (c *Container) Available() bool

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) error

func (*Container) NetworkInfo

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

func (*Container) Remove

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

func (*Container) SetMileStone

func (c *Container) SetMileStone(state utils.State) error

func (*Container) SetStatus

func (c *Container) SetStatus(status utils.Status) 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

func (*Container) UpdateContId

func (c *Container) UpdateContId() error

type CreateArgs

type CreateArgs struct {
	ImageId          string
	Box              *provision.Box
	Deploy           bool
	Provisioner      DockerProvisioner
	DestinationHosts []string
}

type DockerProvisioner

type DockerProvisioner interface {
	Cluster() *cluster.Cluster
	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
	Box         *provision.Box
	Deploy      bool
}

Jump to

Keyboard shortcuts

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