layers

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

Package layers deals with container layer mounting/unmounting for LCOW and WCOW

Index

Constants

View Source
const (
	UnmountOperationSCSI  UnmountOperation = 0x01
	UnmountOperationVSMB                   = 0x02
	UnmountOperationVPMEM                  = 0x04
	UnmountOperationAll                    = UnmountOperationSCSI | UnmountOperationVSMB | UnmountOperationVPMEM
)

Variables

This section is empty.

Functions

func GetHCSLayers

func GetHCSLayers(ctx context.Context, vm *uvm.UtilityVM, paths []string) (layers []hcsschema.Layer, err error)

GetHCSLayers converts host paths corresponding to container layers into HCS schema V2 layers

func MountContainerLayers

func MountContainerLayers(ctx context.Context, containerID string, layerFolders []string, guestRoot string, volumeMountPath string, vm *uvm.UtilityVM) (_ string, err error)

func UnmountContainerLayers

func UnmountContainerLayers(ctx context.Context, layerFolders []string, containerRootPath, volumeMountPath string, vm *uvm.UtilityVM, op UnmountOperation) error

UnmountContainerLayers is a helper for clients to hide all the complexity of layer unmounting

Types

type ImageLayers

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

ImageLayers contains all the layers for an image.

func NewImageLayers

func NewImageLayers(vm *uvm.UtilityVM, containerRootInUVM string, layers []string, volumeMountPath string, skipCleanup bool) *ImageLayers

func (*ImageLayers) Release

func (layers *ImageLayers) Release(ctx context.Context, all bool) error

Release unmounts all of the layers located in the layers array.

type UnmountOperation

type UnmountOperation uint

UnmountOperation is used when calling Unmount() to determine what type of unmount is required. In V1 schema, this must be unmountOperationAll. In V2, client can be more optimal and only unmount what they need which can be a minor performance improvement (eg if you know only one container is running in a utility VM, and the UVM is about to be torn down, there's no need to unmount the VSMB shares, just SCSI to have a consistent file system).

Jump to

Keyboard shortcuts

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