target

package
v0.0.0-pre.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiskLabel

func DiskLabel(vm *object.VirtualMachine, disk *types.VirtualDisk) string

func NeedsFullCopy

func NeedsFullCopy(ctx context.Context, t Target) (bool, bool, error)

Types

type DiskTarget

type DiskTarget struct {
	VirtualMachine *object.VirtualMachine
	Disk           *types.VirtualDisk
	DeviceTarget   string
}

func NewDiskTarget

func NewDiskTarget(vm *object.VirtualMachine, disk *types.VirtualDisk, deviceTarget string) (*DiskTarget, error)

func (*DiskTarget) Connect

func (t *DiskTarget) Connect(ctx context.Context) error

func (*DiskTarget) Disconnect

func (t *DiskTarget) Disconnect(ctx context.Context) error

func (*DiskTarget) Exists

func (t *DiskTarget) Exists(ctx context.Context) (bool, error)

func (*DiskTarget) GetCurrentChangeID

func (t *DiskTarget) GetCurrentChangeID(ctx context.Context) (*vmware.ChangeID, error)

func (*DiskTarget) GetDisk

func (t *DiskTarget) GetDisk() *types.VirtualDisk

func (*DiskTarget) GetPath

func (t *DiskTarget) GetPath(ctx context.Context) (string, error)

func (*DiskTarget) WriteChangeID

func (t *DiskTarget) WriteChangeID(ctx context.Context, changeID *vmware.ChangeID) error

type Target

type Target interface {
	GetDisk() *types.VirtualDisk
	Connect(context.Context) error
	GetPath(context.Context) (string, error)
	Disconnect(context.Context) error
	Exists(context.Context) (bool, error)
	GetCurrentChangeID(context.Context) (*vmware.ChangeID, error)
	WriteChangeID(context.Context, *vmware.ChangeID) error
}

Jump to

Keyboard shortcuts

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