data

package
v0.0.0-...-6c774e4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBindFailure   = errBindFailure()
	ErrUnbindFailure = errUnbindFailure()
)
View Source
var (
	ErrUnsupportedVolumeType    = errUnsupportedVolumeType()
	ErrUnsupportedFileSystem    = errUnsupportedFileSystem()
	ErrUnableToCreateMountPoint = errUnableToCreateMountPoint()
)
View Source
var (
	ErrSshConnection = errSshConnection()
	ErrSshLoadKeys   = errSshLoadKeys()
)

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	PasswdFile string
	Mounts     string
	User       string
	Hosts      []Host
	Dryrun     bool
	Version    bool
}

func NewConfiguration

func NewConfiguration() (*Configuration, error)

type Connection

type Connection interface {
	Bind(mntCmd, remoteMount, localMount string) error
	Unbind(umntCmd, remoteMount, localMount string) error
}

type Host

type Host struct {
	Name    string
	Volumes []Volume
}

type LvmSnapshot

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

func NewLvmSnapshot

func NewLvmSnapshot(c *Configuration, conn Connection, h *Host, v *Volume) (*LvmSnapshot, error)

func (*LvmSnapshot) Create

func (l *LvmSnapshot) Create() error

func (*LvmSnapshot) Destroy

func (l *LvmSnapshot) Destroy() error

func (*LvmSnapshot) Host

func (l *LvmSnapshot) Host() *Host

func (*LvmSnapshot) Mount

func (l *LvmSnapshot) Mount() error

func (*LvmSnapshot) Unmount

func (l *LvmSnapshot) Unmount() error

func (*LvmSnapshot) Volume

func (l *LvmSnapshot) Volume() *Volume

type Snapshot

type Snapshot interface {
	Create() error
	Destroy() error
	Mount() error
	Unmount() error
	Volume() *Volume
	Host() *Host
}

func NewSnapshot

func NewSnapshot(conf *Configuration, conn Connection, h *Host, v *Volume) (Snapshot, error)

type SshConnection

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

func NewSshConnection

func NewSshConnection(host, user string, config *Configuration) *SshConnection

func (*SshConnection) Bind

func (sc *SshConnection) Bind(mountCmd, remoteMount, localMount string) error

func (*SshConnection) Unbind

func (sc *SshConnection) Unbind(umountCmd, remoteMount, localMount string) error

type Volume

type Volume struct {
	Name       string
	Type       string
	FileSystem string
	Location   string
}

Jump to

Keyboard shortcuts

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