Documentation ¶
Index ¶
- Variables
- type CifsHostFolder
- type HostFolder
- type Manager
- func (m *Manager) Add(hostFolder HostFolder, allInstances bool)
- func (m *Manager) Exist(name string) bool
- func (m *Manager) ExistAny() bool
- func (m *Manager) List(driver drivers.Driver) ([]MountInfo, error)
- func (m *Manager) Mount(driver drivers.Driver, name string) error
- func (m *Manager) MountAll(driver drivers.Driver) error
- func (m *Manager) Remove(name string) error
- func (m *Manager) Umount(driver drivers.Driver, name string) error
- type MountInfo
- type SSHFSHostFolder
- type Type
Constants ¶
This section is empty.
Variables ¶
var (
SftpPort = 2022
)
Functions ¶
This section is empty.
Types ¶
type CifsHostFolder ¶ added in v1.15.0
type CifsHostFolder struct {
// contains filtered or unexported fields
}
func (*CifsHostFolder) Config ¶ added in v1.15.0
func (h *CifsHostFolder) Config() config.HostFolderConfig
type HostFolder ¶ added in v1.15.0
type HostFolder interface { // Config returns the host folder configuration for this HostFolder. Config() config.HostFolderConfig // Mount mounts the host folder specified by name into the running VM. nil is returned on success. // An error is returned, if the VM is not running, the specified host folder does not exist or the mount fails. Mount(driver drivers.Driver) error // Umount umounts the host folder specified by name. nil is returned on success. // An error is returned, if the VM is not running, the specified host folder does not exist or the mount fails. Umount(driver drivers.Driver) error }
func NewCifsHostFolder ¶ added in v1.15.0
func NewCifsHostFolder(config config.HostFolderConfig) HostFolder
func NewSSHFSHostFolder ¶ added in v1.15.0
func NewSSHFSHostFolder(config config.HostFolderConfig, globalConfig *miniConfig.GlobalConfigType) HostFolder
type Manager ¶ added in v1.15.0
type Manager struct {
// contains filtered or unexported fields
}
Manager is the central point for all operations around managing hostfolders.
func NewManager ¶ added in v1.15.0
func NewManager(instanceConfig *miniConfig.InstanceConfigType, allInstancesConfig *miniConfig.GlobalConfigType) (*Manager, error)
NewAddOnManager creates a new add-on manager for the specified add-on directory.
func (*Manager) Add ¶ added in v1.15.0
func (m *Manager) Add(hostFolder HostFolder, allInstances bool)
Add adds teh specified host folder to the configuration. Depending on the allInstances flag the configuration is either saved to the instance configuration or the global all instances configuration.
func (*Manager) Exist ¶ added in v1.15.0
Exist returns true if the host folder with the specified name exist, false otherwise.
func (*Manager) ExistAny ¶ added in v1.15.0
ExistAny returns true if at least one host folder configuration exists, false otherwise.
func (*Manager) List ¶ added in v1.15.0
List returns a list of MountInfo instances for the configured host folders. If an error occurs nil is returned together with the error.
func (*Manager) Mount ¶ added in v1.15.0
Mount mounts the host folder specified by name into the running VM. nil is returned on success. An error is returned, if the VM is not running, the specified host folder does not exist or the mount fails.
type SSHFSHostFolder ¶ added in v1.15.0
type SSHFSHostFolder struct {
// contains filtered or unexported fields
}
func (*SSHFSHostFolder) Config ¶ added in v1.15.0
func (h *SSHFSHostFolder) Config() config.HostFolderConfig