Documentation ¶
Overview ¶
Please see https://github.com/heketi/heketi/wiki/API for documentation
Index ¶
- type BrickInfo
- type Cluster
- type ClusterInfoResponse
- type ClusterListResponse
- type Device
- type DeviceAddRequest
- type DeviceInfo
- type DeviceInfoResponse
- type DisperseDurability
- type DurabilityType
- type EntryState
- type HostAddresses
- type NodeAddRequest
- type NodeInfo
- type NodeInfoResponse
- type ReplicaDurability
- type StateRequest
- type StorageSize
- type TopologyInfoResponse
- type VolumeCreateRequest
- type VolumeDurabilityInfo
- type VolumeExpandRequest
- type VolumeInfo
- type VolumeInfoResponse
- type VolumeListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrickInfo ¶
type BrickInfo struct { Id string `json:"id"` Path string `json:"path"` DeviceId string `json:"device"` NodeId string `json:"node"` // Size in KB Size uint64 `json:"size"` }
Brick
type Cluster ¶
type Cluster struct { Volumes []VolumeInfoResponse `json:"volumes"` Nodes []NodeInfoResponse `json:"nodes"` Id string `json:"id"` }
Cluster
type ClusterInfoResponse ¶
type ClusterInfoResponse struct { Id string `json:"id"` Nodes sort.StringSlice `json:"nodes"` Volumes sort.StringSlice `json:"volumes"` }
type ClusterListResponse ¶
type ClusterListResponse struct {
Clusters []string `json:"clusters"`
}
type DeviceAddRequest ¶
type DeviceInfo ¶
type DeviceInfo struct { Device Storage StorageSize `json:"storage"` Id string `json:"id"` }
type DeviceInfoResponse ¶
type DeviceInfoResponse struct { DeviceInfo State EntryState `json:"state"` Bricks []BrickInfo `json:"bricks"` }
type DisperseDurability ¶
type DurabilityType ¶
type DurabilityType string
const ( DurabilityReplicate DurabilityType = "replicate" DurabilityDistributeOnly DurabilityType = "none" DurabilityEC DurabilityType = "disperse" )
type EntryState ¶
type EntryState string
State
const ( EntryStateUnknown EntryState = "" EntryStateOnline EntryState = "online" EntryStateOffline EntryState = "offline" EntryStateFailed EntryState = "failed" )
type HostAddresses ¶
type HostAddresses struct { Manage sort.StringSlice `json:"manage"` Storage sort.StringSlice `json:"storage"` }
type NodeAddRequest ¶
type NodeAddRequest struct { Zone int `json:"zone"` Hostnames HostAddresses `json:"hostnames"` ClusterId string `json:"cluster"` }
Node
type NodeInfo ¶
type NodeInfo struct { NodeAddRequest Id string `json:"id"` }
type NodeInfoResponse ¶
type NodeInfoResponse struct { NodeInfo State EntryState `json:"state"` DevicesInfo []DeviceInfoResponse `json:"devices"` }
type ReplicaDurability ¶
type ReplicaDurability struct {
Replica int `json:"replica,omitempty"`
}
Durabilities
type StorageSize ¶
type StorageSize struct { Total uint64 `json:"total"` Free uint64 `json:"free"` Used uint64 `json:"used"` }
Storage values in KB
type TopologyInfoResponse ¶
type TopologyInfoResponse struct {
ClusterList []Cluster `json:"clusters"`
}
type VolumeCreateRequest ¶
type VolumeCreateRequest struct { // Size in GB Size int `json:"size"` Clusters []string `json:"clusters,omitempty"` Name string `json:"name"` Durability VolumeDurabilityInfo `json:"durability,omitempty"` Snapshot struct { Enable bool `json:"enable"` Factor float32 `json:"factor"` } `json:"snapshot"` }
type VolumeDurabilityInfo ¶
type VolumeDurabilityInfo struct { Type DurabilityType `json:"type,omitempty"` Replicate ReplicaDurability `json:"replicate,omitempty"` Disperse DisperseDurability `json:"disperse,omitempty"` }
Volume
type VolumeExpandRequest ¶
type VolumeExpandRequest struct {
Size int `json:"expand_size"`
}
type VolumeInfo ¶
type VolumeInfoResponse ¶
type VolumeInfoResponse struct { VolumeInfo Bricks []BrickInfo `json:"bricks"` }
func NewVolumeInfoResponse ¶
func NewVolumeInfoResponse() *VolumeInfoResponse
type VolumeListResponse ¶
type VolumeListResponse struct {
Volumes []string `json:"volumes"`
}
Click to show internal directories.
Click to hide internal directories.