api

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Please see https://github.com/heketi/heketi/wiki/API for documentation

Index

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 Device

type Device struct {
	Name string `json:"name"`
}

Device

type DeviceAddRequest

type DeviceAddRequest struct {
	Device
	NodeId string `json:"node"`
}

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 DisperseDurability struct {
	Data       int `json:"data,omitempty"`
	Redundancy int `json:"redundancy,omitempty"`
}

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 StateRequest

type StateRequest struct {
	State EntryState `json:"state"`
}

Common

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"`
	Gid        int64                `json:"gid,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 VolumeInfo struct {
	VolumeCreateRequest
	Id      string `json:"id"`
	Cluster string `json:"cluster"`
	Mount   struct {
		GlusterFS struct {
			Hosts      []string          `json:"hosts"`
			MountPoint string            `json:"device"`
			Options    map[string]string `json:"options"`
		} `json:"glusterfs"`
	} `json:"mount"`
}

type VolumeInfoResponse

type VolumeInfoResponse struct {
	VolumeInfo
	Bricks []BrickInfo `json:"bricks"`
}

func NewVolumeInfoResponse

func NewVolumeInfoResponse() *VolumeInfoResponse

func (*VolumeInfoResponse) String

func (v *VolumeInfoResponse) String() string

String functions

type VolumeListResponse

type VolumeListResponse struct {
	Volumes []string `json:"volumes"`
}

Jump to

Keyboard shortcuts

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