initial commit
This commit is contained in:
25
pkg/storage/storage.go
Normal file
25
pkg/storage/storage.go
Normal file
@@ -0,0 +1,25 @@
|
||||
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.
|
||||
Reference in New Issue
Block a user