mount

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMounted

func IsMounted(localPath string) (bool, error)

IsMounted reports whether a given local mount path is currently mounted.

Types

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) AbortMount

func (m *Manager) AbortMount(p *PreparedMount)

func (*Manager) CheckPrereqs

func (m *Manager) CheckPrereqs() error

func (*Manager) FinalizeMount

func (m *Manager) FinalizeMount(p *PreparedMount) error

func (*Manager) FinalizeUnmount

func (m *Manager) FinalizeUnmount(hostID int, primaryErr error) error

func (*Manager) IsMounted

func (m *Manager) IsMounted(hostID int) (bool, *Mount)

func (*Manager) ListActive

func (m *Manager) ListActive() []Mount

func (*Manager) PrepareMount

func (m *Manager) PrepareMount(hostID int, conn ssh.Connection, remotePath string, displayName string) (*PreparedMount, error)

func (*Manager) PrepareUnmount

func (m *Manager) PrepareUnmount(hostID int) (*exec.Cmd, string, error)

func (*Manager) RestoreMounted

func (m *Manager) RestoreMounted(records []Mount)

RestoreMounted marks mounts as active if they are still mounted on the system. This is used on startup when the previous app session chose to keep mounts open.

func (*Manager) UnmountAll

func (m *Manager) UnmountAll()

type Mount

type Mount struct {
	HostID     int
	Hostname   string
	LocalPath  string
	RemotePath string
	KeyPath    string
	PID        int
}

type PreparedMount

type PreparedMount struct {
	HostID    int
	Hostname  string
	LocalPath string
	// contains filtered or unexported fields
}

func (*PreparedMount) Cmd

func (p *PreparedMount) Cmd() *exec.Cmd

Jump to

Keyboard shortcuts

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