kubernetesk8s.io/kubernetes/pkg/volume/util/nsenter Index | Files

package nsenter

import "k8s.io/kubernetes/pkg/volume/util/nsenter"

Index

Functions

func NewHostUtil

func NewHostUtil(ne *nsenter.Nsenter, rootDir string) mount.HostUtils

NewHostUtil returns a new implementation of mount.HostUtils for unsupported platforms

Types

type Mounter

type Mounter struct{}

Mounter provides the mount.Interface implementation for unsupported platforms.

func NewMounter

func NewMounter(rootDir string, ne *nsenter.Nsenter) *Mounter

NewMounter returns a new Mounter for the current system

func (*Mounter) GetMountRefs

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

GetMountRefs finds all mount references to the path, returns a list of paths. Always returns an error on unsupported platforms

func (*Mounter) IsLikelyNotMountPoint

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

IsLikelyNotMountPoint determines if a directory is not a mountpoint. It is a noop on unsupported systems

func (*Mounter) IsMountPointMatch

func (*Mounter) IsMountPointMatch(mp mount.MountPoint, dir string) bool

IsMountPointMatch tests if dir and mp are the same path

func (*Mounter) List

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

List returns a list of all mounted filesystems. It is a noop for unsupported systems

func (*Mounter) Mount

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

Mount mounts the source to the target. It is a noop for unsupported systems

func (*Mounter) Unmount

func (*Mounter) Unmount(target string) error

Unmount unmounts the target path from the system. it is a noop for unsupported systems

Source Files

nsenter_mount_unsupported.go

Version
v1.16.0-beta.1
Published
Aug 20, 2019
Platform
js/wasm
Imports
4 packages
Last checked
10 minutes ago

Tools for package owners.