mount

package
v0.8.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathExists

func PathExists(path string) (bool, error)

notExist false ,Exist true

Types

type Default

type Default struct {
}

func (*Default) Mount

func (d *Default) Mount(target string, upperDir string, layers ...string) error

copy all layers to target merged dir

func (*Default) Unmount

func (d *Default) Unmount(target string) error

Unmount target

type Info

type Info struct {
	Target string
	Upper  string
	Lowers []string
}

func GetBuildMountInfo

func GetBuildMountInfo(filter string) []Info

func GetMountDetails

func GetMountDetails(target string) (bool, *Info)

func GetRemoteMountDetails

func GetRemoteMountDetails(s ssh.Interface, ip net.IP, target string) (bool, *Info)

type Interface

type Interface interface {
	// Mount merged layer files
	Mount(target string, upperDir string, layers ...string) error
	Unmount(target string) error
}

func NewMountDriver

func NewMountDriver() Interface

type Overlay2

type Overlay2 struct {
}

func (*Overlay2) Mount

func (o *Overlay2) Mount(target string, upperLayer string, layers ...string) error

Mount using overlay2 to merged layer files

func (*Overlay2) Unmount

func (o *Overlay2) Unmount(target string) error

Unmount target

type Service

type Service interface {
	TempMount() error
	TempUMount() error
	CleanUp()
	GetMountTarget() string
	GetMountUpper() string
	GetLowLayers() []string
}

func NewMountService

func NewMountService(target, upper string, lowLayers []string) (Service, error)

NewMountService will create temp dir if target or upper is nil. it is convenient for use in build stage

func NewMountServiceByTarget

func NewMountServiceByTarget(target string) Service

NewMountServiceByTarget will filter file system by target,if not existed,return false.

Jump to

Keyboard shortcuts

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