Documentation ¶
Index ¶
- type Disk
- func (d *Disk) GetDiskState(context context.Context, request *GetDiskStateRequest) (*GetDiskStateResponse, error)
- func (d *Disk) GetDiskStats(context context.Context, request *GetDiskStatsRequest) (*GetDiskStatsResponse, error)
- func (d *Disk) ListDiskIDs(context context.Context, request *ListDiskIDsRequest) (*ListDiskIDsResponse, error)
- func (d *Disk) ListDiskLocations(context context.Context, request *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error)
- func (d *Disk) PartitionDisk(context context.Context, request *PartitionDiskRequest) (*PartitionDiskResponse, error)
- func (d *Disk) Rescan(context context.Context, request *RescanRequest) (*RescanResponse, error)
- func (d *Disk) SetDiskState(context context.Context, request *SetDiskStateRequest) (*SetDiskStateResponse, error)
- type DiskIDs
- type DiskLocation
- type GetDiskStateRequest
- type GetDiskStateResponse
- type GetDiskStatsRequest
- type GetDiskStatsResponse
- type Interface
- type ListDiskIDsRequest
- type ListDiskIDsResponse
- type ListDiskLocationsRequest
- type ListDiskLocationsResponse
- type PartitionDiskRequest
- type PartitionDiskResponse
- type RescanRequest
- type RescanResponse
- type SetDiskStateRequest
- type SetDiskStateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Disk ¶
type Disk struct {
// contains filtered or unexported fields
}
func (*Disk) GetDiskState ¶
func (d *Disk) GetDiskState(context context.Context, request *GetDiskStateRequest) (*GetDiskStateResponse, error)
func (*Disk) GetDiskStats ¶
func (d *Disk) GetDiskStats(context context.Context, request *GetDiskStatsRequest) (*GetDiskStatsResponse, error)
func (*Disk) ListDiskIDs ¶
func (d *Disk) ListDiskIDs(context context.Context, request *ListDiskIDsRequest) (*ListDiskIDsResponse, error)
func (*Disk) ListDiskLocations ¶
func (d *Disk) ListDiskLocations(context context.Context, request *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error)
func (*Disk) PartitionDisk ¶
func (d *Disk) PartitionDisk(context context.Context, request *PartitionDiskRequest) (*PartitionDiskResponse, error)
func (*Disk) Rescan ¶
func (d *Disk) Rescan(context context.Context, request *RescanRequest) (*RescanResponse, error)
func (*Disk) SetDiskState ¶
func (d *Disk) SetDiskState(context context.Context, request *SetDiskStateRequest) (*SetDiskStateResponse, error)
type DiskLocation ¶
type GetDiskStateRequest ¶
type GetDiskStateRequest struct { // Disk device ID of the disk DiskNumber uint32 }
type GetDiskStateResponse ¶
type GetDiskStateResponse struct { // Online state of the disk. true for online, false for offline IsOnline bool }
type GetDiskStatsRequest ¶
type GetDiskStatsRequest struct { // Disk device number of the disk to get the stats from DiskNumber uint32 }
type GetDiskStatsResponse ¶
type GetDiskStatsResponse struct {
TotalBytes int64
}
type Interface ¶
type Interface interface { // GetDiskState gets the offline/online state of a disk. GetDiskState(context.Context, *GetDiskStateRequest) (*GetDiskStateResponse, error) // GetDiskStats returns the stats of a disk (currently it returns the disk size). GetDiskStats(context.Context, *GetDiskStatsRequest) (*GetDiskStatsResponse, error) // ListDiskIDs returns a map of DiskID objects where the key is the disk number. ListDiskIDs(context.Context, *ListDiskIDsRequest) (*ListDiskIDsResponse, error) // ListDiskLocations returns locations <Adapter, Bus, Target, LUN ID> of all // disk devices enumerated by the host. ListDiskLocations(context.Context, *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error) // PartitionDisk initializes and partitions a disk device with the GPT partition style // (if the disk has not been partitioned already) and returns the resulting volume device ID. PartitionDisk(context.Context, *PartitionDiskRequest) (*PartitionDiskResponse, error) // Rescan refreshes the host's storage cache. Rescan(context.Context, *RescanRequest) (*RescanResponse, error) // SetDiskState sets the offline/online state of a disk. SetDiskState(context.Context, *SetDiskStateRequest) (*SetDiskStateResponse, error) }
type ListDiskIDsRequest ¶
type ListDiskIDsRequest struct { }
type ListDiskIDsResponse ¶
type ListDiskLocationsRequest ¶
type ListDiskLocationsRequest struct { }
type ListDiskLocationsResponse ¶
type ListDiskLocationsResponse struct { // Map of disk device IDs and <adapter, bus, target, lun ID> associated with each disk device DiskLocations map[uint32]*DiskLocation }
type PartitionDiskRequest ¶
type PartitionDiskRequest struct { // Disk device ID of the disk to partition DiskNumber uint32 }
type PartitionDiskResponse ¶
type PartitionDiskResponse struct { }
type RescanRequest ¶
type RescanRequest struct { }
type RescanResponse ¶
type RescanResponse struct { }
type SetDiskStateRequest ¶
type SetDiskStateResponse ¶
type SetDiskStateResponse struct { }
Click to show internal directories.
Click to hide internal directories.