Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dev ¶
type Dev struct {
Name string `json:"name"`
WWN string `json:"wwn"`
Number string `json:"number"`
Path string `json:"path"`
Size uint64 `json:"size"`
Vendor string `json:"vendor"`
Model string `json:"model"`
Type string `json:"type"`
}
Dev is a block device.
func (Dev) HasChildren ¶
func (Dev) HasParents ¶
func (Dev) IsMpathPath ¶
type DeviceClaims ¶
type DeviceClaims map[string]interface{}
DeviceClaims is a dedup-map indexed by block device path.
func (DeviceClaims) AddPath ¶
func (t DeviceClaims) AddPath(s string)
func (DeviceClaims) AddResource ¶
func (t DeviceClaims) AddResource(r interface{})
type Disk ¶
type Disk struct {
ID string `json:"id"`
DevPath string `json:"devpath"`
Size uint64 `json:"size"`
Vendor string `json:"vendor"`
Model string `json:"model"`
Type string `json:"type"`
Regions []Region `json:"regions"`
}
Disk is a block device at the bottom of the stacking. Multipath is a special case of stacking: a multipath is a Disk, but not its paths.
type Disks ¶
type Disks []Disk
func GetDisks ¶
func GetDisks(claims ObjectsDeviceClaims) (Disks, error)
GetDisks return the list of disks visible on the node. Multipath paths are not considered disks.
type ObjectsDeviceClaims ¶
type ObjectsDeviceClaims map[string]DeviceClaims
ObjectsDeviceClaims is a map of DeviceClaims indexed by object path. It links objects to block device paths.
func NewObjectsDeviceClaims ¶
func NewObjectsDeviceClaims() ObjectsDeviceClaims
func (ObjectsDeviceClaims) AddObjects ¶
func (t ObjectsDeviceClaims) AddObjects(objs ...interface{})
type Region ¶
type Region struct {
ID string `json:"id"`
DevPath string `json:"devpath"`
Object string `json:"object"`
Size uint64 `json:"size"`
Group string `json:"group"`
}
Region is a Disk part claimed by an object.
Click to show internal directories.
Click to hide internal directories.