mount

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mounts = []Mount{
	{
		Source: "proc",
		Target: "/proc",
		Fs:     "proc",
		Flags:  syscall.MS_NOSUID | syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_RELATIME,
	},
	{
		Source: "devtmpfs",
		Target: "/dev",
		Fs:     "devtmpfs",
		Flags:  syscall.MS_NOSUID | syscall.MS_RELATIME,
		Data:   "mode=755",
	},
	{
		Source: "devpts",
		Target: "/dev/pts",
		Fs:     "devpts",
		Flags:  syscall.MS_NOSUID | syscall.MS_NOEXEC | syscall.MS_RELATIME,

		Data: "mode=620,ptmxmode=000",
	},
	{
		Source: "sysfs",
		Target: "/sys",
		Fs:     "sysfs",
		Flags:  syscall.MS_NOSUID | syscall.MS_NODEV | syscall.MS_NOEXEC | syscall.MS_RELATIME,
	},
}

Functions

func ShareMount

func ShareMount(target string, flags uintptr) error

Types

type Mount

type Mount struct {
	Source string
	Target string
	Fs     string
	Flags  int
	Data   string
}

type Mounter

type Mounter interface {
	CreateMount(volume *api.Volume) error
	DeleteMount(volume *api.Volume) error
	AttachMount(unitname, src, dst string) error
	DetachMount(unitname, dst string) error
	MountSpecial(unitname string) error
	UnmountSpecial(unitname string)
	BindMount(src, dst string) error
	Unmount(dir string) error
	PivotRoot(rootfs, oldrootfs string) error
}

func NewOSMounter

func NewOSMounter(basedir string) Mounter

type OSMounter

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

func (*OSMounter) AttachMount

func (om *OSMounter) AttachMount(unit, src, dst string) error

func (*OSMounter) BindMount

func (om *OSMounter) BindMount(src, dst string) error

func (*OSMounter) CreateMount

func (om *OSMounter) CreateMount(volume *api.Volume) error

func (*OSMounter) DeleteMount

func (om *OSMounter) DeleteMount(volume *api.Volume) error

func (*OSMounter) DetachMount

func (om *OSMounter) DetachMount(unit, dst string) error

func (*OSMounter) MountSpecial

func (om *OSMounter) MountSpecial(unitname string) error

func (*OSMounter) PivotRoot

func (om *OSMounter) PivotRoot(rootfs, oldrootfs string) error

func (*OSMounter) Unmount

func (om *OSMounter) Unmount(dir string) error

func (*OSMounter) UnmountSpecial

func (om *OSMounter) UnmountSpecial(unitname string)

Jump to

Keyboard shortcuts

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