block

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 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.

NamespaceName contains configuration resources.

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.

Jump to

Keyboard shortcuts

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