docker

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorType

type ErrorType int
const (
	ErrorTypeUnableToCreateImage       ErrorType = iota
	ErrorTypeUnableToGetImage          ErrorType = iota
	ErrorTypeBadStatusCodeFromGetImage ErrorType = iota
	ErrorTypeUnableToCreateTarFile     ErrorType = iota
	ErrorTypeUnableToCopyTarFile       ErrorType = iota
	ErrorTypeUnableToGetFileStats      ErrorType = iota
)

func (ErrorType) String

func (et ErrorType) String() string

type ImagePullError

type ImagePullError struct {
	Code      ErrorType
	RootCause error
}

func (ImagePullError) Error

func (ipe ImagePullError) Error() string

func (*ImagePullError) String

func (ipe *ImagePullError) String() string

type ImagePullStats

type ImagePullStats struct {
	CreateDuration *time.Duration
	SaveDuration   *time.Duration
	TotalDuration  *time.Duration
	TarFileSizeMBs *int
	Err            *ImagePullError
}

type ImagePuller

type ImagePuller struct {
	// contains filtered or unexported fields
}

func NewImagePuller

func NewImagePuller() *ImagePuller

func (*ImagePuller) PullImage

func (ip *ImagePuller) PullImage(image common.Image) ImagePullStats

PullImage gives us access to a docker image by:

  1. hitting a docker create endpoint (?)
  2. pulling down the newly created image and saving as a tarball

It does this by accessing the host's docker daemon, locally, over the docker socket. This gives us a window into any images that are local.

Jump to

Keyboard shortcuts

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