hostmount

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mounter

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

func New

func New(ne *nsenter.Nsenter) *Mounter

func (*Mounter) GetMountRefs

func (n *Mounter) GetMountRefs(pathname string) ([]string, error)

func (*Mounter) IsLikelyNotMountPoint

func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error)

func (*Mounter) List

func (*Mounter) List() ([]mount.MountPoint, error)

List returns a list of all mounted filesystems in the host's mount namespace.

func (*Mounter) Mount

func (n *Mounter) Mount(source string, target string, fstype string, options []string) error

Mount runs mount(8) in the host's root mount namespace. Aside from this aspect, Mount has the same semantics as the mounter returned by mount.New()

func (*Mounter) MountSensitive

func (n *Mounter) MountSensitive(source string, target string, fstype string, options []string, sensitiveOptions []string) error

MountSensitive is the same as Mount() but this method allows sensitiveOptions to be passed in a separate parameter from the normal mount options and ensures the sensitiveOptions are never logged. This method should be used by callers that pass sensitive material (like passwords) as mount options.

func (*Mounter) Unmount

func (n *Mounter) Unmount(target string) error

Jump to

Keyboard shortcuts

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