github.com/hernad/nomad@v1.6.112/helper/mount/mount.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package mount
     5  
     6  // Mounter defines the set of methods to allow for mount operations on a system.
     7  type Mounter interface {
     8  	// IsNotAMountPoint detects if a provided directory is not a mountpoint.
     9  	IsNotAMountPoint(file string) (bool, error)
    10  
    11  	// Mount will mount filesystem according to the specified configuration, on
    12  	// the condition that the target path is *not* already mounted. Options must
    13  	// be specified like the mount or fstab unix commands: "opt1=val1,opt2=val2".
    14  	Mount(device, target, mountType, options string) error
    15  }
    16  
    17  // Compile-time check to ensure all Mounter implementations satisfy
    18  // the mount interface.
    19  var _ Mounter = &mounter{}