storage

package
v1.9.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StorageService_Disks_FullMethodName           = "/storage.StorageService/Disks"
	StorageService_BlockDeviceWipe_FullMethodName = "/storage.StorageService/BlockDeviceWipe"
)

Variables

View Source
var (
	Disk_DiskType_name = map[int32]string{
		0: "UNKNOWN",
		1: "SSD",
		2: "HDD",
		3: "NVME",
		4: "SD",
		5: "CD",
	}
	Disk_DiskType_value = map[string]int32{
		"UNKNOWN": 0,
		"SSD":     1,
		"HDD":     2,
		"NVME":    3,
		"SD":      4,
		"CD":      5,
	}
)

Enum value maps for Disk_DiskType.

View Source
var (
	BlockDeviceWipeDescriptor_Method_name = map[int32]string{
		0: "FAST",
		1: "ZEROES",
	}
	BlockDeviceWipeDescriptor_Method_value = map[string]int32{
		"FAST":   0,
		"ZEROES": 1,
	}
)

Enum value maps for BlockDeviceWipeDescriptor_Method.

View Source
var File_storage_storage_proto protoreflect.FileDescriptor
View Source
var StorageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "storage.StorageService",
	HandlerType: (*StorageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Disks",
			Handler:    _StorageService_Disks_Handler,
		},
		{
			MethodName: "BlockDeviceWipe",
			Handler:    _StorageService_BlockDeviceWipe_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "storage/storage.proto",
}

StorageService_ServiceDesc is the grpc.ServiceDesc for StorageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterStorageServiceServer

func RegisterStorageServiceServer(s grpc.ServiceRegistrar, srv StorageServiceServer)

Types

type BlockDeviceWipe

type BlockDeviceWipe struct {
	Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockDeviceWipe) Descriptor deprecated

func (*BlockDeviceWipe) Descriptor() ([]byte, []int)

Deprecated: Use BlockDeviceWipe.ProtoReflect.Descriptor instead.

func (*BlockDeviceWipe) GetMetadata

func (x *BlockDeviceWipe) GetMetadata() *common.Metadata

func (*BlockDeviceWipe) MarshalToSizedBufferVT

func (m *BlockDeviceWipe) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*BlockDeviceWipe) MarshalToVT

func (m *BlockDeviceWipe) MarshalToVT(dAtA []byte) (int, error)

func (*BlockDeviceWipe) MarshalVT

func (m *BlockDeviceWipe) MarshalVT() (dAtA []byte, err error)

func (*BlockDeviceWipe) ProtoMessage

func (*BlockDeviceWipe) ProtoMessage()

func (*BlockDeviceWipe) ProtoReflect

func (x *BlockDeviceWipe) ProtoReflect() protoreflect.Message

func (*BlockDeviceWipe) Reset

func (x *BlockDeviceWipe) Reset()

func (*BlockDeviceWipe) SizeVT

func (m *BlockDeviceWipe) SizeVT() (n int)

func (*BlockDeviceWipe) String

func (x *BlockDeviceWipe) String() string

func (*BlockDeviceWipe) UnmarshalVT

func (m *BlockDeviceWipe) UnmarshalVT(dAtA []byte) error

type BlockDeviceWipeDescriptor

type BlockDeviceWipeDescriptor struct {

	// Device name to wipe (e.g. sda or sda5).
	//
	// The name should be submitted without `/dev/` prefix.
	Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
	// Wipe method to use.
	Method BlockDeviceWipeDescriptor_Method `protobuf:"varint,2,opt,name=method,proto3,enum=storage.BlockDeviceWipeDescriptor_Method" json:"method,omitempty"`
	// Skip the volume in use check.
	SkipVolumeCheck bool `protobuf:"varint,3,opt,name=skip_volume_check,json=skipVolumeCheck,proto3" json:"skip_volume_check,omitempty"`
	// contains filtered or unexported fields
}

BlockDeviceWipeDescriptor represents a single block device to be wiped.

The device can be either a full disk (e.g. vda) or a partition (vda5). The device should not be used in any of active volumes. The device should not be used as a secondary (e.g. part of LVM).

func (*BlockDeviceWipeDescriptor) Descriptor deprecated

func (*BlockDeviceWipeDescriptor) Descriptor() ([]byte, []int)

Deprecated: Use BlockDeviceWipeDescriptor.ProtoReflect.Descriptor instead.

func (*BlockDeviceWipeDescriptor) GetDevice

func (x *BlockDeviceWipeDescriptor) GetDevice() string

func (*BlockDeviceWipeDescriptor) GetMethod

func (*BlockDeviceWipeDescriptor) GetSkipVolumeCheck

func (x *BlockDeviceWipeDescriptor) GetSkipVolumeCheck() bool

func (*BlockDeviceWipeDescriptor) MarshalToSizedBufferVT

func (m *BlockDeviceWipeDescriptor) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*BlockDeviceWipeDescriptor) MarshalToVT

func (m *BlockDeviceWipeDescriptor) MarshalToVT(dAtA []byte) (int, error)

func (*BlockDeviceWipeDescriptor) MarshalVT

func (m *BlockDeviceWipeDescriptor) MarshalVT() (dAtA []byte, err error)

func (*BlockDeviceWipeDescriptor) ProtoMessage

func (*BlockDeviceWipeDescriptor) ProtoMessage()

func (*BlockDeviceWipeDescriptor) ProtoReflect

func (*BlockDeviceWipeDescriptor) Reset

func (x *BlockDeviceWipeDescriptor) Reset()

func (*BlockDeviceWipeDescriptor) SizeVT

func (m *BlockDeviceWipeDescriptor) SizeVT() (n int)

func (*BlockDeviceWipeDescriptor) String

func (x *BlockDeviceWipeDescriptor) String() string

func (*BlockDeviceWipeDescriptor) UnmarshalVT

func (m *BlockDeviceWipeDescriptor) UnmarshalVT(dAtA []byte) error

type BlockDeviceWipeDescriptor_Method

type BlockDeviceWipeDescriptor_Method int32
const (
	// Fast wipe - wipe only filesystem signatures.
	BlockDeviceWipeDescriptor_FAST BlockDeviceWipeDescriptor_Method = 0
	// Zeroes wipe - wipe by overwriting with zeroes (might be slow depending on the disk size and available hardware features).
	BlockDeviceWipeDescriptor_ZEROES BlockDeviceWipeDescriptor_Method = 1
)

func (BlockDeviceWipeDescriptor_Method) Descriptor

func (BlockDeviceWipeDescriptor_Method) Enum

func (BlockDeviceWipeDescriptor_Method) EnumDescriptor deprecated

func (BlockDeviceWipeDescriptor_Method) EnumDescriptor() ([]byte, []int)

Deprecated: Use BlockDeviceWipeDescriptor_Method.Descriptor instead.

func (BlockDeviceWipeDescriptor_Method) Number

func (BlockDeviceWipeDescriptor_Method) String

func (BlockDeviceWipeDescriptor_Method) Type

type BlockDeviceWipeRequest

type BlockDeviceWipeRequest struct {
	Devices []*BlockDeviceWipeDescriptor `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockDeviceWipeRequest) Descriptor deprecated

func (*BlockDeviceWipeRequest) Descriptor() ([]byte, []int)

Deprecated: Use BlockDeviceWipeRequest.ProtoReflect.Descriptor instead.

func (*BlockDeviceWipeRequest) GetDevices

func (*BlockDeviceWipeRequest) MarshalToSizedBufferVT

func (m *BlockDeviceWipeRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*BlockDeviceWipeRequest) MarshalToVT

func (m *BlockDeviceWipeRequest) MarshalToVT(dAtA []byte) (int, error)

func (*BlockDeviceWipeRequest) MarshalVT

func (m *BlockDeviceWipeRequest) MarshalVT() (dAtA []byte, err error)

func (*BlockDeviceWipeRequest) ProtoMessage

func (*BlockDeviceWipeRequest) ProtoMessage()

func (*BlockDeviceWipeRequest) ProtoReflect

func (x *BlockDeviceWipeRequest) ProtoReflect() protoreflect.Message

func (*BlockDeviceWipeRequest) Reset

func (x *BlockDeviceWipeRequest) Reset()

func (*BlockDeviceWipeRequest) SizeVT

func (m *BlockDeviceWipeRequest) SizeVT() (n int)

func (*BlockDeviceWipeRequest) String

func (x *BlockDeviceWipeRequest) String() string

func (*BlockDeviceWipeRequest) UnmarshalVT

func (m *BlockDeviceWipeRequest) UnmarshalVT(dAtA []byte) error

type BlockDeviceWipeResponse

type BlockDeviceWipeResponse struct {
	Messages []*BlockDeviceWipe `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockDeviceWipeResponse) Descriptor deprecated

func (*BlockDeviceWipeResponse) Descriptor() ([]byte, []int)

Deprecated: Use BlockDeviceWipeResponse.ProtoReflect.Descriptor instead.

func (*BlockDeviceWipeResponse) GetMessages

func (x *BlockDeviceWipeResponse) GetMessages() []*BlockDeviceWipe

func (*BlockDeviceWipeResponse) MarshalToSizedBufferVT

func (m *BlockDeviceWipeResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*BlockDeviceWipeResponse) MarshalToVT

func (m *BlockDeviceWipeResponse) MarshalToVT(dAtA []byte) (int, error)

func (*BlockDeviceWipeResponse) MarshalVT

func (m *BlockDeviceWipeResponse) MarshalVT() (dAtA []byte, err error)

func (*BlockDeviceWipeResponse) ProtoMessage

func (*BlockDeviceWipeResponse) ProtoMessage()

func (*BlockDeviceWipeResponse) ProtoReflect

func (x *BlockDeviceWipeResponse) ProtoReflect() protoreflect.Message

func (*BlockDeviceWipeResponse) Reset

func (x *BlockDeviceWipeResponse) Reset()

func (*BlockDeviceWipeResponse) SizeVT

func (m *BlockDeviceWipeResponse) SizeVT() (n int)

func (*BlockDeviceWipeResponse) String

func (x *BlockDeviceWipeResponse) String() string

func (*BlockDeviceWipeResponse) UnmarshalVT

func (m *BlockDeviceWipeResponse) UnmarshalVT(dAtA []byte) error

type Disk

type Disk struct {

	// Size indicates the disk size in bytes.
	Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	// Model idicates the disk model.
	Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	// DeviceName indicates the disk name (e.g. `sda`).
	DeviceName string `protobuf:"bytes,3,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
	// Name as in `/sys/block/<dev>/device/name`.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// Serial as in `/sys/block/<dev>/device/serial`.
	Serial string `protobuf:"bytes,5,opt,name=serial,proto3" json:"serial,omitempty"`
	// Modalias as in `/sys/block/<dev>/device/modalias`.
	Modalias string `protobuf:"bytes,6,opt,name=modalias,proto3" json:"modalias,omitempty"`
	// Uuid as in `/sys/block/<dev>/device/uuid`.
	Uuid string `protobuf:"bytes,7,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// Wwid as in `/sys/block/<dev>/device/wwid`.
	Wwid string `protobuf:"bytes,8,opt,name=wwid,proto3" json:"wwid,omitempty"`
	// Type is a type of the disk: nvme, ssd, hdd, sd card.
	Type Disk_DiskType `protobuf:"varint,9,opt,name=type,proto3,enum=storage.Disk_DiskType" json:"type,omitempty"`
	// BusPath is the bus path of the disk.
	BusPath string `protobuf:"bytes,10,opt,name=bus_path,json=busPath,proto3" json:"bus_path,omitempty"`
	// SystemDisk indicates that the disk is used as Talos system disk.
	SystemDisk bool `protobuf:"varint,11,opt,name=system_disk,json=systemDisk,proto3" json:"system_disk,omitempty"`
	// Subsystem is the symlink path in the `/sys/block/<dev>/subsystem`.
	Subsystem string `protobuf:"bytes,12,opt,name=subsystem,proto3" json:"subsystem,omitempty"`
	// Readonly specifies if the disk is read only.
	Readonly bool `protobuf:"varint,13,opt,name=readonly,proto3" json:"readonly,omitempty"`
	// contains filtered or unexported fields
}

Disk represents a disk.

func (*Disk) Descriptor deprecated

func (*Disk) Descriptor() ([]byte, []int)

Deprecated: Use Disk.ProtoReflect.Descriptor instead.

func (*Disk) GetBusPath

func (x *Disk) GetBusPath() string

func (*Disk) GetDeviceName

func (x *Disk) GetDeviceName() string

func (*Disk) GetModalias

func (x *Disk) GetModalias() string

func (*Disk) GetModel

func (x *Disk) GetModel() string

func (*Disk) GetName

func (x *Disk) GetName() string

func (*Disk) GetReadonly added in v1.6.0

func (x *Disk) GetReadonly() bool

func (*Disk) GetSerial

func (x *Disk) GetSerial() string

func (*Disk) GetSize

func (x *Disk) GetSize() uint64

func (*Disk) GetSubsystem added in v1.4.0

func (x *Disk) GetSubsystem() string

func (*Disk) GetSystemDisk added in v1.4.0

func (x *Disk) GetSystemDisk() bool

func (*Disk) GetType

func (x *Disk) GetType() Disk_DiskType

func (*Disk) GetUuid

func (x *Disk) GetUuid() string

func (*Disk) GetWwid

func (x *Disk) GetWwid() string

func (*Disk) MarshalToSizedBufferVT

func (m *Disk) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Disk) MarshalToVT

func (m *Disk) MarshalToVT(dAtA []byte) (int, error)

func (*Disk) MarshalVT

func (m *Disk) MarshalVT() (dAtA []byte, err error)

func (*Disk) ProtoMessage

func (*Disk) ProtoMessage()

func (*Disk) ProtoReflect

func (x *Disk) ProtoReflect() protoreflect.Message

func (*Disk) Reset

func (x *Disk) Reset()

func (*Disk) SizeVT

func (m *Disk) SizeVT() (n int)

func (*Disk) String

func (x *Disk) String() string

func (*Disk) UnmarshalVT

func (m *Disk) UnmarshalVT(dAtA []byte) error

type Disk_DiskType

type Disk_DiskType int32
const (
	Disk_UNKNOWN Disk_DiskType = 0
	Disk_SSD     Disk_DiskType = 1
	Disk_HDD     Disk_DiskType = 2
	Disk_NVME    Disk_DiskType = 3
	Disk_SD      Disk_DiskType = 4
	Disk_CD      Disk_DiskType = 5
)

func (Disk_DiskType) Descriptor

func (Disk_DiskType) Enum

func (x Disk_DiskType) Enum() *Disk_DiskType

func (Disk_DiskType) EnumDescriptor deprecated

func (Disk_DiskType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Disk_DiskType.Descriptor instead.

func (Disk_DiskType) Number

func (Disk_DiskType) String

func (x Disk_DiskType) String() string

func (Disk_DiskType) Type

type Disks

type Disks struct {
	Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Disks    []*Disk          `protobuf:"bytes,2,rep,name=disks,proto3" json:"disks,omitempty"`
	// contains filtered or unexported fields
}

DisksResponse represents the response of the `Disks` RPC.

func (*Disks) Descriptor deprecated

func (*Disks) Descriptor() ([]byte, []int)

Deprecated: Use Disks.ProtoReflect.Descriptor instead.

func (*Disks) GetDisks

func (x *Disks) GetDisks() []*Disk

func (*Disks) GetMetadata

func (x *Disks) GetMetadata() *common.Metadata

func (*Disks) MarshalToSizedBufferVT

func (m *Disks) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Disks) MarshalToVT

func (m *Disks) MarshalToVT(dAtA []byte) (int, error)

func (*Disks) MarshalVT

func (m *Disks) MarshalVT() (dAtA []byte, err error)

func (*Disks) ProtoMessage

func (*Disks) ProtoMessage()

func (*Disks) ProtoReflect

func (x *Disks) ProtoReflect() protoreflect.Message

func (*Disks) Reset

func (x *Disks) Reset()

func (*Disks) SizeVT

func (m *Disks) SizeVT() (n int)

func (*Disks) String

func (x *Disks) String() string

func (*Disks) UnmarshalVT

func (m *Disks) UnmarshalVT(dAtA []byte) error

type DisksResponse

type DisksResponse struct {
	Messages []*Disks `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*DisksResponse) Descriptor deprecated

func (*DisksResponse) Descriptor() ([]byte, []int)

Deprecated: Use DisksResponse.ProtoReflect.Descriptor instead.

func (*DisksResponse) GetMessages

func (x *DisksResponse) GetMessages() []*Disks

func (*DisksResponse) MarshalToSizedBufferVT

func (m *DisksResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*DisksResponse) MarshalToVT

func (m *DisksResponse) MarshalToVT(dAtA []byte) (int, error)

func (*DisksResponse) MarshalVT

func (m *DisksResponse) MarshalVT() (dAtA []byte, err error)

func (*DisksResponse) ProtoMessage

func (*DisksResponse) ProtoMessage()

func (*DisksResponse) ProtoReflect

func (x *DisksResponse) ProtoReflect() protoreflect.Message

func (*DisksResponse) Reset

func (x *DisksResponse) Reset()

func (*DisksResponse) SizeVT

func (m *DisksResponse) SizeVT() (n int)

func (*DisksResponse) String

func (x *DisksResponse) String() string

func (*DisksResponse) UnmarshalVT

func (m *DisksResponse) UnmarshalVT(dAtA []byte) error

type StorageServiceClient

type StorageServiceClient interface {
	Disks(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DisksResponse, error)
	// BlockDeviceWipe performs a wipe of the blockdevice (partition or disk).
	//
	// The method doesn't require a reboot, and it can only wipe blockdevices which are not
	// being used as volumes at the moment.
	// Wiping of volumes requires a different API.
	BlockDeviceWipe(ctx context.Context, in *BlockDeviceWipeRequest, opts ...grpc.CallOption) (*BlockDeviceWipeResponse, error)
}

StorageServiceClient is the client API for StorageService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

StorageService represents the storage service.

type StorageServiceServer

type StorageServiceServer interface {
	Disks(context.Context, *emptypb.Empty) (*DisksResponse, error)
	// BlockDeviceWipe performs a wipe of the blockdevice (partition or disk).
	//
	// The method doesn't require a reboot, and it can only wipe blockdevices which are not
	// being used as volumes at the moment.
	// Wiping of volumes requires a different API.
	BlockDeviceWipe(context.Context, *BlockDeviceWipeRequest) (*BlockDeviceWipeResponse, error)
	// contains filtered or unexported methods
}

StorageServiceServer is the server API for StorageService service. All implementations must embed UnimplementedStorageServiceServer for forward compatibility.

StorageService represents the storage service.

type UnimplementedStorageServiceServer

type UnimplementedStorageServiceServer struct{}

UnimplementedStorageServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedStorageServiceServer) BlockDeviceWipe

func (UnimplementedStorageServiceServer) Disks

type UnsafeStorageServiceServer

type UnsafeStorageServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeStorageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StorageServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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