hostfolder

package
v1.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 (*CifsHostFolder) Mount added in v1.15.0

func (h *CifsHostFolder) Mount(driver drivers.Driver) error

func (*CifsHostFolder) Umount added in v1.15.0

func (h *CifsHostFolder) Umount(driver drivers.Driver) error

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 *minishiftConfig.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 *minishiftConfig.InstanceConfigType, allInstancesConfig *minishiftConfig.GlobalConfigType) (*Manager, error)

NewManager 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

func (m *Manager) Exist(name string) bool

Exist returns true if the host folder with the specified name exist, false otherwise.

func (*Manager) ExistAny added in v1.15.0

func (m *Manager) ExistAny() bool

ExistAny returns true if at least one host folder configuration exists, false otherwise.

func (*Manager) List added in v1.15.0

func (m *Manager) List(driver drivers.Driver) ([]MountInfo, error)

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

func (m *Manager) Mount(driver drivers.Driver, name string) error

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.

func (*Manager) MountAll added in v1.15.0

func (m *Manager) MountAll(driver drivers.Driver) error

MountAll mounts all defined host folders.

func (*Manager) Remove added in v1.15.0

func (m *Manager) Remove(name string) error

Remove removes the specified host folder from the configuration. If the host folder does not exist an error is returned.

func (*Manager) Umount added in v1.15.0

func (m *Manager) Umount(driver drivers.Driver, name string) 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.

type MountInfo added in v1.15.0

type MountInfo struct {
	Name       string
	Type       string
	Source     string
	MountPoint string
	Mounted    bool
}

type SSHFSHostFolder added in v1.15.0

type SSHFSHostFolder struct {
	// contains filtered or unexported fields
}

func (*SSHFSHostFolder) Config added in v1.15.0

func (*SSHFSHostFolder) Mount added in v1.15.0

func (h *SSHFSHostFolder) Mount(driver drivers.Driver) error

func (*SSHFSHostFolder) Umount added in v1.15.0

func (h *SSHFSHostFolder) Umount(driver drivers.Driver) error

type Type added in v1.15.0

type Type int
const (
	// SSHFS defines the constant to be used for the SSFS host folder type.
	SSHFS Type = iota

	// CIFS defines the constant to be used for the CIFS host folder type.
	CIFS
)

func (Type) String added in v1.15.0

func (t Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL