container

package
v0.0.0-...-1b7c243 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLogDriverMandatory  = errors.New("log-driver is mandatory")
	ErrLogDriverBSNoParams = errors.New("bs log-driver do not accept log-opts, please use node-container-update to configure it.")
)

Functions

func BsSysLogPort

func BsSysLogPort() int

func LogIsBS

func LogIsBS(pool string) (bool, error)

func LogLoadAll

func LogLoadAll() (map[string]DockerLogConfig, error)

func LogOpts

func LogOpts(pool string) (string, map[string]string, error)

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 {
	types.Container `bson:",inline"`
}

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

func (c *Container) ExpectedStatus() provision.Status

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 provision.Status, 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) Sleep

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

func (*Container) Start

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

func (*Container) Stop

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

func (*Container) ValidAddr

func (c *Container) ValidAddr() bool

type CreateArgs

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

type DockerLogConfig

type DockerLogConfig struct {
	types.DockerLogConfig
}

func (*DockerLogConfig) Save

func (logConf *DockerLogConfig) Save(pool string) error

type DockerProvisioner

type DockerProvisioner interface {
	Cluster() *cluster.Cluster
	Collection() *storage.Collection
	PushImage(name, tag string) error
	ActionLimiter() provision.ActionLimiter
	GetNodeByHost(host string) (cluster.Node, error)
}

type NetworkInfo

type NetworkInfo struct {
	HTTPHostPort string
	IP           string
}

type Pty

type Pty struct {
	Width  int
	Height int
	Term   string
}

type SchedulerError

type SchedulerError struct {
	Base error
}

func (*SchedulerError) Error

func (e *SchedulerError) Error() string

type SchedulerOpts

type SchedulerOpts struct {
	AppName       string
	ProcessName   string
	UpdateName    bool
	ActionLimiter provision.ActionLimiter
	LimiterDone   func()
}

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