layers

package
v0.0.0-...-88ead7d Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TAR_FILES_INFO_SIZE = 8

Variables

This section is empty.

Functions

func DockerVersion

func DockerVersion(ua []string) (string, error)

func GenDiff

func GenDiff(s storage.Storage, imageID string)

func GenerateAncestry

func GenerateAncestry(s storage.Storage, imageID, parentID string) (err error)

func GetImageDiffCache

func GetImageDiffCache(s storage.Storage, imageID string) ([]byte, error)

func GetImageFilesCache

func GetImageFilesCache(s storage.Storage, imageID string) ([]byte, error)

func GetImageFilesJson

func GetImageFilesJson(s storage.Storage, imageID string) ([]byte, error)

return json file listing for given image id Download the specified layer and determine the file contents. If the cache already exists, just return it.

func SetImageDiffCache

func SetImageDiffCache(s storage.Storage, imageID string, diffJson []byte) error

func SetImageFilesCache

func SetImageFilesCache(s storage.Storage, imageID string, filesJson []byte) error

func StoreChecksum

func StoreChecksum(s storage.Storage, imageID string, checksums []string) error

func UpdateIndexImages

func UpdateIndexImages(s storage.Storage, namespace, repo string, additionalBytes []byte,
	additional []map[string]interface{}) error

this function takes both []byte and []map[string]interface{} to shortcut in some cases.

Types

type TarError

type TarError string

func (TarError) Error

func (e TarError) Error() string

type TarFilesInfo

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

func NewTarFilesInfo

func NewTarFilesInfo() *TarFilesInfo

func (*TarFilesInfo) Append

func (t *TarFilesInfo) Append(h *tar.Header)

func (*TarFilesInfo) Json

func (t *TarFilesInfo) Json() ([]byte, error)

This function returns json containing a slice of file info objects file info is a weird tuple (why it isn't just a map i have no idea) file info: [

filename,
file type,
is deleted,
size,
mod time,
mode,
uid,
gid

]

func (*TarFilesInfo) Load

func (t *TarFilesInfo) Load(file io.Reader) error

type TarInfo

type TarInfo struct {
	TarSum       *TarSum
	TarFilesInfo *TarFilesInfo
	Error        error
}

func NewTarInfo

func NewTarInfo() *TarInfo

func (*TarInfo) Load

func (t *TarInfo) Load(file io.ReadSeeker)

type TarSum

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

func NewTarSum

func NewTarSum() *TarSum

func (*TarSum) Append

func (t *TarSum) Append(header *tar.Header, reader io.Reader)

func (*TarSum) Compute

func (t *TarSum) Compute(seed []byte) string

Jump to

Keyboard shortcuts

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