Documentation ¶
Overview ¶
Package pool provides components to work with storage pools.
Package pool provides components to work with storage pools.
Package pool provides components to work with storage pools.
Index ¶
- Constants
- type Cloner
- type Config
- type FSManager
- type Manager
- func (pm *Manager) Active() FSManager
- func (pm *Manager) GetFSManager(name string) (FSManager, error)
- func (pm *Manager) GetFSManagerList() []FSManager
- func (pm *Manager) GetPoolToUpdate() *list.Element
- func (pm *Manager) Reload(cfg Config) error
- func (pm *Manager) ReloadPools() error
- func (pm *Manager) SetActive(element *list.Element)
- type ManagerConfig
- type Pooler
- type Snapshotter
- type StateReporter
Constants ¶
const ( // ZFS defines the zfs filesystem name. ZFS = "zfs" // LVM defines the lvm filesystem name. LVM = "lvm" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cloner ¶
type Cloner interface { CreateClone(name, snapshotID string) error DestroyClone(name string) error ListClonesNames() ([]string, error) }
Cloner describes methods of clone management.
type Config ¶
type Config struct { MountDir string `yaml:"mountDir"` CloneSubDir string `yaml:"clonesMountSubDir"` DataSubDir string `yaml:"dataSubDir"` SocketSubDir string `yaml:"socketSubDir"` ObserverSubDir string `yaml:"observerSubDir"` PreSnapshotSuffix string `yaml:"preSnapshotSuffix"` }
Config defines a config of a pool manager.
type FSManager ¶
type FSManager interface { Cloner Snapshotter StateReporter Pooler }
FSManager defines an interface to work different thin-clone managers.
func NewManager ¶
func NewManager(runner runners.Runner, config ManagerConfig) (FSManager, error)
NewManager defines constructor for thin-clone managers.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager describes a pool manager.
func NewPoolManager ¶
NewPoolManager creates a new pool manager.
func (*Manager) GetFSManager ¶
GetFSManager returns a filesystem manager by name if exists.
func (*Manager) GetFSManagerList ¶
GetFSManagerList returns a filesystem manager list.
func (*Manager) GetPoolToUpdate ¶
GetPoolToUpdate returns the element to update.
func (*Manager) ReloadPools ¶
ReloadPools updates available pool managers.
type ManagerConfig ¶
ManagerConfig defines thin-clone manager config.
type Snapshotter ¶
type Snapshotter interface { CreateSnapshot(poolSuffix, dataStateAt string) (snapshotName string, err error) DestroySnapshot(snapshotName string) (err error) CleanupSnapshots(retentionLimit int) ([]string, error) GetSnapshots() ([]resources.Snapshot, error) }
Snapshotter describes methods of snapshot management.
type StateReporter ¶
type StateReporter interface { GetSessionState(name string) (*resources.SessionState, error) GetDiskState() (*resources.Disk, error) }
StateReporter describes methods of state reporting.