block

package
v1.8.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package block provides resources related to blockdevices, mounts, etc.

Index

Constants

View Source
const DeviceType = resource.Type("BlockDevices.block.talos.dev")

DeviceType is type of BlockDevice resource.

View Source
const DiscoveredVolumeType = resource.Type("DiscoveredVolumes.block.talos.dev")

DiscoveredVolumeType is type of BlockDiscoveredVolume resource.

View Source
const DiskType = resource.Type("Disks.block.talos.dev")

DiskType is type of Disk resource.

NamespaceName contains configuration resources.

View Source
const SystemDiskID resource.ID = "system-disk"

SystemDiskID is the singleton resource ID.

View Source
const SystemDiskType = resource.Type("SystemDisks.block.talos.dev")

SystemDiskType is type of SystemDisk resource.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

Device resource holds status of hardware devices (overall).

func NewDevice

func NewDevice(namespace resource.Namespace, id resource.ID) *Device

NewDevice initializes a BlockDevice resource.

type DeviceExtension

type DeviceExtension struct{}

DeviceExtension is auxiliary resource data for BlockDevice.

func (DeviceExtension) ResourceDefinition

func (DeviceExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

type DeviceSpec

type DeviceSpec struct {
	Type            string `yaml:"type" protobuf:"1"`
	Major           int    `yaml:"major" protobuf:"2"`
	Minor           int    `yaml:"minor" protobuf:"3"`
	PartitionName   string `yaml:"partitionName,omitempty" protobuf:"4"`
	PartitionNumber int    `yaml:"partitionNumber,omitempty" protobuf:"5"`
	DevicePath      string `yaml:"devicePath" protobuf:"7"`

	// Generation is bumped every time the device might have changed and might need to be re-probed.
	Generation int `yaml:"generation" protobuf:"6"`

	// Parent (if set) specifies the parent device ID.
	Parent string `yaml:"parent,omitempty" protobuf:"8"`
}

DeviceSpec is the spec for devices status.

func (DeviceSpec) DeepCopy

func (o DeviceSpec) DeepCopy() DeviceSpec

DeepCopy generates a deep copy of DeviceSpec.

type DiscoveredVolume

DiscoveredVolume resource holds status of hardware DiscoveredVolumes (overall).

func NewDiscoveredVolume

func NewDiscoveredVolume(namespace resource.Namespace, id resource.ID) *DiscoveredVolume

NewDiscoveredVolume initializes a BlockDiscoveredVolume resource.

type DiscoveredVolumeExtension

type DiscoveredVolumeExtension struct{}

DiscoveredVolumeExtension is auxiliary resource data for BlockDiscoveredVolume.

func (DiscoveredVolumeExtension) ResourceDefinition

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

type DiscoveredVolumeSpec

type DiscoveredVolumeSpec struct {
	Type       string `yaml:"type" protobuf:"14"`
	DevicePath string `yaml:"devicePath" protobuf:"15"`
	Parent     string `yaml:"parent,omitempty" protobuf:"16"`

	// Overall size of the probed device (in bytes).
	Size uint64 `yaml:"size" protobuf:"1"`

	// Sector size of the device (in bytes).
	SectorSize uint `yaml:"sectorSize,omitempty" protobuf:"2"`

	// Optimal I/O size for the device (in bytes).
	IOSize uint `yaml:"ioSize,omitempty" protobuf:"3"`

	Name  string `yaml:"name" protobuf:"4"`
	UUID  string `yaml:"uuid,omitempty" protobuf:"5"`
	Label string `yaml:"label,omitempty" protobuf:"6"`

	BlockSize           uint32 `yaml:"blockSize,omitempty" protobuf:"7"`
	FilesystemBlockSize uint32 `yaml:"filesystemBlockSize,omitempty" protobuf:"8"`
	ProbedSize          uint64 `yaml:"probedSize,omitempty" protobuf:"9"`

	PartitionUUID  string `yaml:"partitionUUID,omitempty" protobuf:"10"`
	PartitionType  string `yaml:"partitionType,omitempty" protobuf:"11"`
	PartitionLabel string `yaml:"partitionLabel,omitempty" protobuf:"12"`
	PartitionIndex uint   `yaml:"partitionIndex,omitempty" protobuf:"13"`
}

DiscoveredVolumeSpec is the spec for DiscoveredVolumes status.

func (DiscoveredVolumeSpec) DeepCopy

DeepCopy generates a deep copy of DiscoveredVolumeSpec.

type Disk added in v1.8.0

Disk resource holds status of hardware disks.

func NewDisk added in v1.8.0

func NewDisk(namespace resource.Namespace, id resource.ID) *Disk

NewDisk initializes a BlockDisk resource.

type DiskExtension added in v1.8.0

type DiskExtension struct{}

DiskExtension is auxiliary resource data for BlockDisk.

func (DiskExtension) ResourceDefinition added in v1.8.0

func (DiskExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

type DiskSpec added in v1.8.0

type DiskSpec struct {
	Size       uint64 `yaml:"size" protobuf:"1"`
	IOSize     uint   `yaml:"ioSize" protobuf:"2"`
	SectorSize uint   `yaml:"sectorSize" protobuf:"3"`

	Readonly bool `yaml:"readonly" protobuf:"4"`
	CDROM    bool `yaml:"cdrom" protobuf:"13"`

	Model      string `yaml:"model,omitempty" protobuf:"5"`
	Serial     string `yaml:"serial,omitempty" protobuf:"6"`
	Modalias   string `yaml:"modalias,omitempty" protobuf:"7"`
	WWID       string `yaml:"wwid,omitempty" protobuf:"8"`
	BusPath    string `yaml:"busPath,omitempty" protobuf:"9"`
	SubSystem  string `yaml:"subSystem,omitempty" protobuf:"10"`
	Transport  string `yaml:"transport,omitempty" protobuf:"11"`
	Rotational bool   `yaml:"rotational,omitempty" protobuf:"12"`
}

DiskSpec is the spec for Disks status.

func (DiskSpec) DeepCopy added in v1.8.0

func (o DiskSpec) DeepCopy() DiskSpec

DeepCopy generates a deep copy of DiskSpec.

type SystemDisk added in v1.8.0

SystemDisk resource holds ID of the disk which is the Talos system disk.

func NewSystemDisk added in v1.8.0

func NewSystemDisk(namespace resource.Namespace, id resource.ID) *SystemDisk

NewSystemDisk initializes a BlockSystemDisk resource.

type SystemDiskExtension added in v1.8.0

type SystemDiskExtension struct{}

SystemDiskExtension is auxiliary resource data for BlockSystemDisk.

func (SystemDiskExtension) ResourceDefinition added in v1.8.0

func (SystemDiskExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

type SystemDiskSpec added in v1.8.0

type SystemDiskSpec struct {
	DiskID string `yaml:"diskID" protobuf:"1"`
}

SystemDiskSpec is the spec for SystemDisks status.

func (SystemDiskSpec) DeepCopy added in v1.8.0

func (o SystemDiskSpec) DeepCopy() SystemDiskSpec

DeepCopy generates a deep copy of SystemDiskSpec.

Jump to

Keyboard shortcuts

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