Help us shape the future of Go! Take the 2026 Go Developer Survey

blockdevice

package
v0.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 0 Imported by: 11

Documentation

Index

Constants

View Source
const (
	// SparseBlockDeviceType is the sparse blockdevice type
	SparseBlockDeviceType = "sparse"
	// BlockDeviceType is the type for blockdevice.
	BlockDeviceType = "blockdevice"
)
View Source
const (
	// Active means blockdevice is available on the host machine
	Active string = "Active"
	// Inactive means blockdevice is currently not available on the host machine
	Inactive string = "Inactive"
	// Unknown means the state cannot be determined at this point of time
	Unknown string = "Unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDevice

type BlockDevice struct {
	// UUID is the UUID for this BlockDevice generated by NDM
	// It is an md5 hash generated based on the various parameters
	// of the BlockDevice. eg: blockdevice-xxx
	UUID string

	// NodeAttributes contains the details of the node on which
	// the BlockDevice is attached
	NodeAttributes NodeAttribute

	// Path is dev path of a device
	// eg : /dev/sda, /dev/sda1, /dev/dm-0
	Path string

	// FSInfo contains the file system related information of this
	// BlockDevice if it exists
	FSInfo FileSystemInformation

	// Status contains the state of the blockdevice
	Status Status
}

BlockDevice is an internal representation of any block device present on the system. All data related to that device will be held by this struct

type FileSystemInformation

type FileSystemInformation struct {
	// FileSystem is the filesystem present on the blockdevice
	FileSystem string

	// MountPoint is the list of mountpoints at which this blockdevice is mounted
	MountPoint []string
}

FileSystemInformation contains the filesystem and mount information of blockdevice, if present

type NodeAttribute

type NodeAttribute map[NodeAttributeKey]string

NodeAttribute is the representing the various attributes of the machine on which this block device is present

type NodeAttributeKey

type NodeAttributeKey string

NodeAttributeKey is a typed string for representing the keys in the node attribute map

const (
	// HostName is the hostname of the system on which this BD is present
	HostName NodeAttributeKey = "hostname"

	// NodeName is the nodename (may be FQDN) on which this BD is present
	NodeName NodeAttributeKey = "nodename"

	// ZoneName is the zone in which the system is present.
	//
	// NOTE: Valid only for cloud providers
	ZoneName NodeAttributeKey = "zone"

	// RegionName is the region in which the system is present.
	//
	// NOTE: Valid only for cloud providers
	RegionName NodeAttributeKey = "region"
)

type Status

type Status struct {
	// State is the state of this BD like Active(Online), Inactive(Offline) or
	// Unknown
	State string

	// ClaimPhase is the phase of this BD when is it is being used by NDM consumers
	ClaimPhase string
}

Status is used to represent the status of the blockdevice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL