storage

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MPL-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

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

Variables

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

Enum value maps for Disk_DiskType.

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
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,
		},
	},
	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 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"`
	// 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) 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
)

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)
}

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.

type StorageServiceServer

type StorageServiceServer interface {
	Disks(context.Context, *emptypb.Empty) (*DisksResponse, error)
	// contains filtered or unexported methods
}

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

type UnimplementedStorageServiceServer

type UnimplementedStorageServiceServer struct {
}

UnimplementedStorageServiceServer must be embedded to have forward compatible implementations.

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