registry

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2016 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

The registry package exists to manage ACIs for acbuild. The main difference between this package and rkt's store is that this package is optimised for many separate calls into the current ACI, as opposed to having a tinier footprint. When an ACI is fetched, it is immediately rendered onto the filesystem, so that when acbuild's run command is invoked many times there's no waiting for files to be untarred or uncompressed.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("ACI not in registry")
)

Functions

func GenImageID

func GenImageID(path string) (string, error)

Types

type Registry

type Registry struct {
	DepStoreTarPath      string
	DepStoreExpandedPath string
	Insecure             bool
	Debug                bool
}

func (Registry) Fetch

func (r Registry) Fetch(imagename types.ACIdentifier, labels types.Labels, size uint, fetchDeps bool) error

Fetch will download the given image, and optionally its dependencies, into r.DepStoreTarPath

func (Registry) FetchAndRender

func (r Registry) FetchAndRender(imagename types.ACIdentifier, labels types.Labels, size uint) error

FetchAndRender will fetch the given image and all of its dependencies if they have not been fetched yet, and will then render them on to the filesystem if they have not been rendered yet.

func (Registry) GetACI

func (r Registry) GetACI(name types.ACIdentifier, labels types.Labels) (string, error)

Returns the key for the ACI with the given name and labels

func (Registry) GetImageManifest

func (r Registry) GetImageManifest(key string) (*schema.ImageManifest, error)

Returns the manifest for the ACI with the given key

func (Registry) HashToKey

func (r Registry) HashToKey(h hash.Hash) string

Converts a Hash to the provider's key

func (Registry) ReadStream

func (r Registry) ReadStream(key string) (io.ReadCloser, error)

Read the ACI contents stream given the key. Use ResolveKey to convert an image ID to the relative provider's key.

func (Registry) ResolveKey

func (r Registry) ResolveKey(key string) (string, error)

Converts an image ID to the, if existent, key under which the ACI is known to the provider

Jump to

Keyboard shortcuts

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