Documentation
¶
Overview ¶
Package volume implements support for maintaining (EBS) volumes on an EC2 instance by watching the disk usage of the underlying disk device and resizing the EBS volumes whenever necessary based on provided parameters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device interface { // FSSize returns the total amount of disk space in the filesystem. FSSize() (data.Size, error) // FSUsage returns the percentage of disk space in-use in the filesystem. FSUsage() (float64, error) // ResizeFS resizes the filesystem. ResizeFS() error }
Device is an abstraction of a physical or logical device.
type Volume ¶
type Volume interface { Device // EBSSize returns the sum of the size of all EBS volumes. EBSSize(ctx context.Context) (size data.Size, err error) // ResizeEBS resizes the EBS volumes such that their sizes add up to newSize. ResizeEBS(ctx context.Context, newSize data.Size) error // EBSIds returns the IDs of all EBS volumes. EBSIds() []string }
Volume is an abstraction of a disk device backed by an EC2 instance's EBS volumes.
func NewEbsLvmVolume ¶
NewEbsLvmVolume returns a Volume backed by EC2 EBS volumes grouped together in an LVM device. Enforces that all backing EBS volumes are of equal size and of the same type. Size modifications are done such that the size is distributed equally across all volumes.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher has the capability of watching a volume and resizing it if and when necessary based on configured set of parameters.
func NewWatcher ¶
NewWatcher creates a new watcher.