layercake

package
v0.0.0-...-6c5b0a6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Abstracts a layered filesystem provider, such as docker's Graph

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AufsCake

type AufsCake struct {
	Cake
	Runner    commandrunner.CommandRunner
	GraphRoot string
}

func (*AufsCake) Create

func (a *AufsCake) Create(childID, parentID ID, id string) error

func (*AufsCake) Get

func (a *AufsCake) Get(id ID) (*image.Image, error)

func (*AufsCake) GetAllLeaves

func (a *AufsCake) GetAllLeaves() ([]ID, error)

func (*AufsCake) IsLeaf

func (a *AufsCake) IsLeaf(id ID) (bool, error)

func (*AufsCake) Remove

func (a *AufsCake) Remove(id ID) error

type Cake

type Cake interface {
	DriverName() string
	Create(layerID, parentID ID, containerID string) error
	Register(img *image.Image, layer archive.ArchiveReader) error
	RegisterWithQuota(img *image.Image, layer archive.ArchiveReader, quota int64) error
	Get(id ID) (*image.Image, error)
	Unmount(id ID) error
	Remove(id ID) error
	Path(id ID) (string, error)
	QuotaedPath(id ID, quota int64) (string, error)
	IsLeaf(id ID) (bool, error)
	GetAllLeaves() ([]ID, error)
	All() []*image.Image
}

type ContainerID

type ContainerID string

func (ContainerID) GraphID

func (c ContainerID) GraphID() string

type Docker

type Docker struct {
	Graph  *graph.Graph
	Driver graphdriver.Driver
}

func (*Docker) All

func (d *Docker) All() (layers []*image.Image)

func (*Docker) Create

func (d *Docker) Create(layerID, parentID ID, containerID string) error

func (*Docker) DriverName

func (d *Docker) DriverName() string

func (*Docker) Get

func (d *Docker) Get(id ID) (*image.Image, error)

func (*Docker) GetAllLeaves

func (d *Docker) GetAllLeaves() ([]ID, error)

func (*Docker) IsLeaf

func (d *Docker) IsLeaf(id ID) (bool, error)

func (*Docker) Path

func (d *Docker) Path(id ID) (result string, err error)

func (*Docker) QuotaedPath

func (d *Docker) QuotaedPath(id ID, quota int64) (string, error)

func (*Docker) Register

func (d *Docker) Register(image *image.Image, layer archive.ArchiveReader) error

func (*Docker) RegisterWithQuota

func (d *Docker) RegisterWithQuota(image *image.Image, layer archive.ArchiveReader, quota int64) error

func (*Docker) Remove

func (d *Docker) Remove(id ID) error

func (*Docker) Unmount

func (d *Docker) Unmount(id ID) error

type DockerImageID

type DockerImageID string

func (DockerImageID) GraphID

func (d DockerImageID) GraphID() string

type GraphPath

type GraphPath string

func (GraphPath) HealthCheck

func (gp GraphPath) HealthCheck() error

type ID

type ID interface {
	GraphID() string
}

type IDProvider

type IDProvider interface {
	ProvideID(path string) (ID, error)
}

type LocalImageID

type LocalImageID struct {
	Path         string
	ModifiedTime time.Time
}

func (LocalImageID) GraphID

func (c LocalImageID) GraphID() string

type NamespacedLayerID

type NamespacedLayerID struct {
	LayerID  ID
	CacheKey string
}

func NamespacedID

func NamespacedID(id ID, cacheKey string) NamespacedLayerID

func (NamespacedLayerID) GraphID

func (n NamespacedLayerID) GraphID() string

type QuotaedDriver

type QuotaedDriver interface {
	graphdriver.Driver
	GetQuotaed(id, mountlabel string, quota int64) (string, error)
}

type Retainer

type Retainer interface {
	Retain(log lager.Logger, id ID)
}

Directories

Path Synopsis
cleanerfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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