26 lines
470 B
Go
26 lines
470 B
Go
package storage
|
|
|
|
// Pool abstracts storage operations (minimal set for v1).
|
|
type Pool interface {
|
|
Name() string
|
|
Type() string
|
|
AllocateVolume(spec VolumeSpec) (Volume, error)
|
|
DeleteVolume(id string) error
|
|
}
|
|
|
|
type VolumeSpec struct {
|
|
Name string
|
|
SizeGB int
|
|
// Pool-specific fields may be embedded later.
|
|
}
|
|
|
|
type Volume struct {
|
|
ID string
|
|
Name string
|
|
Pool string
|
|
SizeGB int
|
|
Path string
|
|
}
|
|
|
|
// TODO: add concrete pool implementations for dir/lvm/zfs.
|