layer0

package
v9.4.47+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

README

Layer0 Graph Driver

Layer0 implemenation piggy backs on existing overlay graphdriver implementation to provide persistent storage for the uppermost/writeable layer in the container rootfs. The persistent storage is derived from one of the OSD volume drivers.

To use this as the graphdriver in Docker with aws as the backend volume provider:

DOCKER_STORAGE_OPTIONS= -s layer0 --storage-opt layer0.volume_driver=aws

Documentation

Index

Constants

View Source
const (
	// Name of the driver
	Name = "layer0"
	// Type of the driver
	Type = api.DriverType_DRIVER_TYPE_GRAPH
	// Layer0VolumeDriver constant
	Layer0VolumeDriver = "layer0.volume_driver"
)

Layer0Graphdriver options. This should be passed in as a st

Variables

This section is empty.

Functions

func Init

func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error)

Init initializes the driver

Types

type Layer0

type Layer0 struct {
	sync.Mutex
	// Driver is an implementation of GraphDriver. Only select methods are overridden
	graphdriver.Driver
	// contains filtered or unexported fields
}

Layer0 implements the graphdriver interface

func (*Layer0) ApplyDiff

func (l *Layer0) ApplyDiff(id string, parent string, diff archive.Reader) (size int64, err error)

ApplyDiff extracts the changeset between the specified layer and its parent

func (*Layer0) Create

func (l *Layer0) Create(id string, parent string, mountLabel string, storageOpts map[string]string) error

Create creates a new and empty filesystem layer

func (*Layer0) Exists

func (l *Layer0) Exists(id string) bool

Exists checks if leyr exists

func (*Layer0) Get

func (l *Layer0) Get(id string, mountLabel string) (string, error)

Get returns the mountpoint for the layered filesystem

func (*Layer0) GetMetadata

func (l *Layer0) GetMetadata(id string) (map[string]string, error)

GetMetadata returns key-value pairs

func (*Layer0) Put

func (l *Layer0) Put(id string) error

Put releases the system resources for the specified id

func (*Layer0) Remove

func (l *Layer0) Remove(id string) error

Remove removes a layer based on its id

type Layer0Vol

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

Layer0Vol represents the volume

Jump to

Keyboard shortcuts

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