imagefmt

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package imagefmt exposes functions to dynamically register methods to detect different types of container image formats.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCouldNotFindLayer is returned when we could not download or open the layer file.
	ErrCouldNotFindLayer = commonerr.NewBadRequestError("could not find layer")
)

Functions

func Extract

func Extract(format, path string, headers map[string]string, toExtract []string) (tarutil.FilesMap, error)

Extract streams an image layer from disk or over HTTP, determines the image format, then extracts the files specified.

func Extractors

func Extractors() map[string]Extractor

Extractors returns the list of the registered extractors.

func RegisterExtractor

func RegisterExtractor(name string, d Extractor)

RegisterExtractor makes an extractor available by the provided name.

If called twice with the same name, the name is blank, or if the provided Extractor is nil, this function panics.

func SetInsecureTLS

func SetInsecureTLS(insecure bool)

SetInsecureTLS sets the insecureTLS to control whether TLS server's certificate chain and hostname are verified when pulling layers.

func UnregisterExtractor

func UnregisterExtractor(name string)

UnregisterExtractor removes a Extractor with a particular name from the list.

Types

type Extractor

type Extractor interface {
	// ExtractFiles produces a tarutil.FilesMap from a image layer.
	ExtractFiles(layer io.ReadCloser, filenames []string) (tarutil.FilesMap, error)
}

Extractor represents an ability to extract files from a particular container image format.

Directories

Path Synopsis
Package aci implements an imagefmt.Extractor for appc formatted container image layers.
Package aci implements an imagefmt.Extractor for appc formatted container image layers.
Package docker implements an imagefmt.Extractor for docker formatted container image layers.
Package docker implements an imagefmt.Extractor for docker formatted container image layers.

Jump to

Keyboard shortcuts

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