imagecache

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package imagecache handles loading and caching of docker images.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageCache

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

ImageCache wraps caching.Cache such that we don't need to do any casting inside the engine and sandbox implementations

func New

func New(d *docker.Client, tracker gc.ResourceTracker, monitor runtime.Monitor) *ImageCache

New creates a new ImageCache object

func (*ImageCache) ImageSchema

func (ic *ImageCache) ImageSchema() schematypes.Schema

ImageSchema returns the JSON schema by which images can be specified when ImageCache.Require is called

func (*ImageCache) Require

func (ic *ImageCache) Require(ctx *runtime.TaskContext, imagePayload interface{}) (*ImageHandle, error)

Require that an image is loaded or returned from cache. The imagePayload given must satisfy ImageCache.ImageSchema()

type ImageHandle

type ImageHandle struct {
	*caching.Handle
	ImageName string
}

ImageHandle wraps caching.Handle such that we don't need to do any casting to access the ImageName

Jump to

Keyboard shortcuts

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