Documentation
¶
Index ¶
Constants ¶
View Source
const ( // BytesToGB used to convert bytes to GB BytesToGB = 1073741824 // BytesToMB used to convert bytes to MB BytesToMB = 1048567 // BytesToKB used to convert bytes to KB BytesToKB = 1024 // MicSec used to convert to microsec to second MicSec = 1000000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { Type string `json:"type,omitempty"` Links map[string]string `json:"links,omitempty"` Actions map[string]string `json:"actions,omitempty"` }
Collection keep the type, link and actions associated with volume
type Replica ¶
type Replica struct { // Address is the address of the replica Address string `json:"Address"` // Mode is the mode of replica. Mode string `json:"Mode"` }
Replica is used to store the info about the replicas connected to the target.
type ResizeInput ¶
ResizeInput is the input for resizing volume
type Resource ¶
type Resource struct { Id string `json:"id,omitempty"` Type string `json:"type,omitempty"` Links map[string]string `json:"links"` Actions map[string]string `json:"actions"` }
Resource keep id, links, actions associated with the volume
type Stats ¶
type Stats struct { Got bool // Iqn is unique iSCSI qualified name, it is used to // configure iscsi initiator and target. Iqn string `json:"iqn"` // Reads is the total no of read io's that's been // read from the volume. Reads json.Number `json:"ReadIOPS"` // TotalReadTime is the total time taken to read from // the device. TotalReadTime json.Number `json:"TotalReadTime"` // TotalReadBlockCount is total no of block that has been // read from the volume. TotalReadBlockCount json.Number `json:"TotalReadBlockCount"` // TotalReadBytes is the total size of the read io's in byte. TotalReadBytes json.Number `json:"TotalReadBytes"` // Writes is the total no of write io's that's been // written to the volume. Writes json.Number `json:"WriteIOPS"` // TotalWriteTime is the total time taken to write to // the volume. TotalWriteTime json.Number `json:"TotalWriteTime"` // TotalWriteBlockCount is total no of block that has been // written to the volume. TotalWriteBlockCount json.Number `json:"TotalWriteBlockCount"` // TotalWriteBytes is the total size of the write io's // in byte. TotalWriteBytes json.Number `json:"TotalWriteBytes"` // UsedLogicalBlocks is the no of logical blocks that is // used by volume. UsedLogicalBlocks json.Number `json:"UsedLogicalBlocks"` // UsedBlocks is the no of physical blocks used by volume. // (each block is a physical sector) UsedBlocks json.Number `json:"UsedBlocks"` // SectorSize minimum storage unit of a hard drive. // Most disk partitioning schemes are designed to have // files occupy an integral number of sectors regardless // of the file's actual size. Files that do not fill a whole // sector will have the remainder of their last sector filled // with zeroes. In practice, operating systems typically // operate on blocks of data, which may span multiple sectors. // (source: https://en.wikipedia.org/wiki/Disk_sector) SectorSize json.Number `json:"SectorSize"` // Size is the size of the volume created. Size json.Number `json:"Size"` // RevisionCounter is the no of times io's have been done // on volume. RevisionCounter json.Number `json:"RevisionCounter"` // ReplicaCounter is the no of replicas connected to target // or controller (istgt or jiva controller) ReplicaCounter json.Number `json:"ReplicaCounter"` // Uptime is the time since target is up. UpTime json.Number `json:"UpTime"` // Name is the name of the volume given while creation Name string `json:"Name"` // Replicas keeps the details about the replicas connected // to the target. Replicas []Replica `json:"Replicas"` // Target status is the status of the target (RW/RO) TargetStatus string `json:"Status"` // IsClientConnected is the status of initiator whether it // is connected to target or not. IsClientConnected bool `json:"IsClientConnected"` }
Stats is used to store the collected stats from Jiva controller
type Volume ¶
type Volume struct { Resource Name string `json:"name"` ReplicaCount int `json:"replicaCount"` ReadOnly string `json:"readOnly"` }
Volume keep the volume info
type Volumes ¶
type Volumes struct { Collection Data []Volume `json:"data"` }
Volumes is the list of volumes per controller
Click to show internal directories.
Click to hide internal directories.