volume

package
v0.0.0-...-bea6086 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CephAuthentication

type CephAuthentication struct {
	UserName string
	UserKey  string
}

type CephDisk

type CephDisk struct {
	Name       string
	Monitors   []CephMonitor
	Auth       *CephAuthentication
	Encryption *CephEncryption
}

type CephEncryption

type CephEncryption struct {
	EncryptionKey string
}

type CephMonitor

type CephMonitor struct {
	Name string
	Port string
}

type Host

type Host interface {
	PluginDir(pluginName string) string
	MachinePluginDir(machineID string, pluginName string) string
	MachineVolumeDir(machineID string, pluginName, volumeName string) string
}

type Plugin

type Plugin interface {
	Init(host Host) error
	Name() string
	GetBackingVolumeID(spec *api.VolumeSpec) (string, error)
	CanSupport(spec *api.VolumeSpec) bool

	Apply(ctx context.Context, spec *api.VolumeSpec, machine *api.Machine) (*Volume, error)
	Delete(ctx context.Context, computeVolumeName string, machineID string) error

	GetSize(ctx context.Context, spec *api.VolumeSpec) (int64, error)
}

type PluginManager

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

func NewPluginManager

func NewPluginManager() *PluginManager

func (*PluginManager) FindPluginByName

func (m *PluginManager) FindPluginByName(name string) (Plugin, error)

func (*PluginManager) FindPluginBySpec

func (m *PluginManager) FindPluginBySpec(volume *api.VolumeSpec) (Plugin, error)

func (*PluginManager) InitPlugins

func (m *PluginManager) InitPlugins(host Host, plugins []Plugin) error

type Volume

type Volume struct {
	QCow2File string
	RawFile   string
	CephDisk  *CephDisk
	Handle    string
	Size      int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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