Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Service ¶
func Service(config ServiceConfig, service string, services systemservice.ServiceManager) error
Service creates a new mount based on the given configuration. The mount is created as a systemd mount unit named service.
func UnmountService ¶
func UnmountService(service string, services systemservice.ServiceManager) error
UnmountService uninstalls the specified mount service.
Types ¶
type Mounter ¶
type Mounter struct {
// contains filtered or unexported fields
}
Mounter is a directory mounter
func NewMounter ¶
NewMounter creates a new Mounter for the specified root directory
func (*Mounter) BindMount ¶
BindMount bind-mounts the specified hostDir. After chroot(r.rootDir), hostDir will be available as localDir inside the new environment
func (*Mounter) RoBindMount ¶
RoBindMount bind-mounts the specified hostDir in read-only mode. After chroot(r.rootDir), hostDir will be available as localDir inside the new environment
type ServiceConfig ¶
type ServiceConfig struct { // What specifies defines the absolute path of a device node, file or other resource to mount What storage.DeviceName // Where specifies the absolute path of a directory for the mount point Where string // Filesystem specifies the file system type Filesystem string // Options lists mount options to use when mounting Options []string }
ServiceConfig describes configuration to mount a directory on a specific device and filesystem
See https://www.freedesktop.org/software/systemd/man/systemd.mount.html