container

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ContainerStateRemoved   = ContainerState("removed")
	ContainerStateNewStatus = ContainerState("status")
	ContainerStateImageSet  = ContainerState("image")
)
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 RunPipelineWithRetry

func RunPipelineWithRetry(pipe *action.Pipeline, args interface{}) 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(client provision.BuilderDockerClient, limiter provision.ActionLimiter, writer io.Writer, isDeploy bool) (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(client provision.BuilderDockerClient, stdin io.Reader, stdout, stderr io.Writer, pty Pty, cmds ...string) error

func (*Container) ExpectedStatus

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

func (*Container) Logs

func (c *Container) Logs(client provision.BuilderDockerClient, w io.Writer) (int, error)

func (*Container) NetworkInfo

func (c *Container) NetworkInfo(client provision.BuilderDockerClient) (NetworkInfo, error)

func (*Container) Remove

func (*Container) SetImage

func (c *Container) SetImage(client provision.BuilderDockerClient, imageID string) error

func (*Container) SetStatus

func (c *Container) SetStatus(client provision.BuilderDockerClient, status provision.Status, triggerCallback bool) error

func (*Container) ShortID

func (c *Container) ShortID() string

func (*Container) Sleep

func (*Container) Start

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

func (*Container) Stop

func (*Container) ValidAddr

func (c *Container) ValidAddr() bool

type ContainerCtxKey

type ContainerCtxKey struct{}

type ContainerState

type ContainerState string

type ContainerStateClient

type ContainerStateClient interface {
	SetContainerState(*Container, ContainerState) error
}

type CreateArgs

type CreateArgs struct {
	ImageID          string
	Commands         []string
	App              provision.App
	Client           provision.BuilderDockerClient
	DestinationHosts []string
	ProcessName      string
	Deploy           bool
	Building         bool
	Event            *event.Event
}

type DockerLogConfig

type DockerLogConfig struct {
	types.DockerLogConfig
}

func (*DockerLogConfig) Save

func (logConf *DockerLogConfig) Save(pool string) 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
	FilterNodes   []string
	ActionLimiter provision.ActionLimiter
	LimiterDone   func()
}

type StartArgs

type StartArgs struct {
	Client  provision.BuilderDockerClient
	Limiter provision.ActionLimiter
	App     provision.App
	Deploy  bool
}

type StartError

type StartError struct {
	Base error
}

func (*StartError) Error

func (e *StartError) Error() string

Jump to

Keyboard shortcuts

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