engine

package
v0.0.0-...-1173b46 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Docker        *docker.Client
	Exit          <-chan struct{}
	CheckInterval <-chan time.Time
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(docker *docker.Client, name string, config *container.Config, hostConfig *container.HostConfig) (*Container, error)

func (*Container) Background

func (c *Container) Background() error

func (*Container) Close

func (c *Container) Close() error

func (*Container) CloseAfterStream

func (c *Container) CloseAfterStream(stream *Stream) error

func (*Container) Commit

func (c *Container) Commit(ref string) (imageID string, err error)

func (*Container) ExtractTo

func (c *Container) ExtractTo(tar io.Reader, path string) error

func (*Container) HealthCheck

func (c *Container) HealthCheck() <-chan string

func (*Container) ID

func (c *Container) ID() string

func (*Container) Mkdir

func (c *Container) Mkdir(path string) error

func (*Container) Shell

func (c *Container) Shell(tty TTY, shell ...string) (err error)

func (*Container) Start

func (c *Container) Start(logPrefix string, logs io.Writer, restart <-chan time.Time) (status int64, err error)

func (*Container) StreamFileFrom

func (c *Container) StreamFileFrom(path string) (Stream, error)

func (*Container) StreamFileTo

func (c *Container) StreamFileTo(stream Stream, path string) error

func (*Container) StreamTarFrom

func (c *Container) StreamTarFrom(path string) (Stream, error)

func (*Container) StreamTarTo

func (c *Container) StreamTarTo(stream Stream, path string) error

type Image

type Image struct {
	Docker *docker.Client
	Exit   <-chan struct{}
}

func (*Image) Build

func (i *Image) Build(tag string, dockerfile Stream) <-chan Progress

func (*Image) Delete

func (i *Image) Delete(id string) error

func (*Image) Pull

func (i *Image) Pull(ref string) <-chan Progress

func (*Image) Push

func (i *Image) Push(ref string, creds RegistryCreds) <-chan Progress

type Progress

type Progress interface {
	Status() (string, error)
}

type RegistryCreds

type RegistryCreds struct {
	Username      string `json:"username"`
	Password      string `json:"password"`
	Email         string `json:"email"`
	ServerAddress string `json:"serveraddress"`
}

type Stream

type Stream struct {
	io.ReadCloser
	*StreamState
}

func NewStream

func NewStream(data io.ReadCloser, size int64) Stream

func (Stream) Close

func (s Stream) Close() error

func (Stream) Out

func (s Stream) Out(dst io.Writer) error

type StreamState

type StreamState struct {
	Size int64
	// contains filtered or unexported fields
}

type TTY

type TTY interface {
	Run(remoteIn io.Reader, remoteOut io.WriteCloser, resize func(w, h uint16) error) error
}

Jump to

Keyboard shortcuts

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