mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 04:27:54 +00:00
ensure pkg/util/mount compiles & crosses
- move compile time check from linux code to generic code
This commit is contained in:
parent
0039d75dd0
commit
92a043e833
@ -51,6 +51,10 @@ type Interface interface {
|
|||||||
GetDeviceNameFromMount(mountPath, pluginDir string) (string, error)
|
GetDeviceNameFromMount(mountPath, pluginDir string) (string, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compile-time check to ensure all Mounter implementations satisfy
|
||||||
|
// the mount interface
|
||||||
|
var _ Interface = &Mounter{}
|
||||||
|
|
||||||
// This represents a single line in /proc/mounts or /etc/fstab.
|
// This represents a single line in /proc/mounts or /etc/fstab.
|
||||||
type MountPoint struct {
|
type MountPoint struct {
|
||||||
Device string
|
Device string
|
||||||
|
@ -54,8 +54,6 @@ const (
|
|||||||
// kubelet is running in the host's root mount namespace.
|
// kubelet is running in the host's root mount namespace.
|
||||||
type Mounter struct{}
|
type Mounter struct{}
|
||||||
|
|
||||||
var _ = Interface(&Mounter{})
|
|
||||||
|
|
||||||
// Mount mounts source to target as fstype with given options. 'source' and 'fstype' must
|
// Mount mounts source to target as fstype with given options. 'source' and 'fstype' must
|
||||||
// be an emtpy string in case it's not required, e.g. for remount, or for auto filesystem
|
// be an emtpy string in case it's not required, e.g. for remount, or for auto filesystem
|
||||||
// type, where kernel handles fs type for you. The mount 'options' is a list of options,
|
// type, where kernel handles fs type for you. The mount 'options' is a list of options,
|
||||||
|
Loading…
Reference in New Issue
Block a user