structs

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Brick

type Brick struct {
	UUID      string `xml:"brick>uuid"`
	Name      string `xml:"brick>name"`
	HostUUID  string `xml:"brick>hostUuid"`
	IsArbiter int    `xml:"brick>isArbiter"`
}

Brick element of "gluster volume info" command

type BrickProfile

type BrickProfile struct {
	//XMLName xml.Name `xml:"brick"`
	BrickName       string          `xml:"brickName"`
	CumulativeStats CumulativeStats `xml:"cumulativeStats"`
}

BrickProfile struct for element brick of "gluster volume {volume} profile" command

type CumulativeStats

type CumulativeStats struct {
	FopStats   FopStats `xml:"fopStats"`
	Duration   int      `xml:"duration"`
	TotalRead  int      `xml:"totalRead"`
	TotalWrite int      `xml:"totalWrite"`
}

CumulativeStats element of "gluster volume {volume} profile" command

type Fop added in v0.2.4

type Fop struct {
	Name       string  `xml:"name"`
	Hits       int     `xml:"hits"`
	AvgLatency float64 `xml:"avgLatency"`
	MinLatency float64 `xml:"minLatency"`
	MaxLatency float64 `xml:"maxLatency"`
}

Fop is struct for FopStats

type FopStats

type FopStats struct {
	Fop []Fop `xml:"fop"`
}

FopStats element of "gluster volume {volume} profile" command

type HealInfo added in v0.2.6

type HealInfo struct {
	XMLName xml.Name       `xml:"healInfo"`
	Bricks  HealInfoBricks `xml:"bricks"`
}

type HealInfoBrick added in v0.2.6

type HealInfoBrick struct {
	XMLName         xml.Name `xml:"brick"`
	Name            string   `xml:"name"`
	Status          string   `xml:"status"`
	NumberOfEntries string   `xml:"numberOfEntries"`
}

type HealInfoBricks added in v0.2.6

type HealInfoBricks struct {
	XMLName xml.Name        `xml:"bricks"`
	Brick   []HealInfoBrick `xml:"brick"`
}

type Hostnames

type Hostnames struct {
	Hostname string `xml:"hostname"`
}

Hostnames element of "gluster peer status" command

type Peer

type Peer struct {
	XMLName   xml.Name  `xml:"peer"`
	UUID      string    `xml:"uuid"`
	Hostname  string    `xml:"hostname"`
	Hostnames Hostnames `xml:"hostnames"`
	Connected int       `xml:"connected"`
	State     int       `xml:"state"`
	StateStr  string    `xml:"stateStr"`
}

Peer element of "gluster peer status" command

type PeerStatus

type PeerStatus struct {
	XMLName xml.Name `xml:"peerStatus"`
	Peer    []Peer   `xml:"peer"`
}

PeerStatus element of "gluster peer status" command

type PeerStatusXML added in v0.2.0

type PeerStatusXML struct {
	XMLName    xml.Name   `xml:"cliOutput"`
	OpRet      int        `xml:"opRet"`
	OpErrno    int        `xml:"opErrno"`
	OpErrstr   string     `xml:"opErrstr"`
	PeerStatus PeerStatus `xml:"peerStatus"`
}

PeerStatusXML struct represents cliOutput element of "gluster peer status" command

func PeerStatusXMLUnmarshall added in v0.2.0

func PeerStatusXMLUnmarshall(cmdOutBuff *bytes.Buffer) (PeerStatusXML, error)

PeerStatusXMLUnmarshall unmarshalls bytes to PeerStatusXML struct

type QuotaLimit added in v0.2.7

type QuotaLimit struct {
	XMLName        xml.Name `xml:"limit"`
	Path           string   `xml:"path"`
	HardLimit      uint64   `xml:"hard_limit"`
	SoftLimitValue uint64   `xml:"soft_limit_value"`
	UsedSpace      uint64   `xml:"used_space"`
	AvailSpace     uint64   `xml:"avail_space"`
	SlExceeded     string   `xml:"sl_exceeded"`
	HlExceeded     string   `xml:"hl_exceeded"`
}

type VolInfo

type VolInfo struct {
	XMLName xml.Name `xml:"volInfo"`
	Volumes Volumes  `xml:"volumes"`
}

VolInfo element of "gluster volume info" command

type VolList

type VolList struct {
	Count  int      `xml:"count"`
	Volume []string `xml:"volume"`
}

VolList element of "gluster volume list" command

type VolProfile

type VolProfile struct {
	Volname    string         `xml:"volname"`
	BrickCount int            `xml:"brickCount"`
	Brick      []BrickProfile `xml:"brick"`
}

VolProfile element of "gluster volume {volume} profile" command

type VolQuota added in v0.2.7

type VolQuota struct {
	XMLName     xml.Name     `xml:"volQuota"`
	QuotaLimits []QuotaLimit `xml:"limit"`
}

type Volume

type Volume struct {
	XMLName    xml.Name `xml:"volume"`
	Name       string   `xml:"name"`
	ID         string   `xml:"id"`
	Status     int      `xml:"status"`
	StatusStr  string   `xml:"statusStr"`
	BrickCount int      `xml:"brickCount"`
	Bricks     []Brick  `xml:"bricks"`
	DistCount  int      `xml:"distCount"`
}

Volume element of "gluster volume info" command

type VolumeHealInfoXML added in v0.2.6

type VolumeHealInfoXML struct {
	XMLName  xml.Name `xml:"cliOutput"`
	OpRet    int      `xml:"opRet"`
	OpErrno  int      `xml:"opErrno"`
	OpErrstr string   `xml:"opErrstr"`
	HealInfo HealInfo `xml:"healInfo"`
}

VolumeHealInfoXML struct repesents cliOutput element of "gluster volume {volume} heal info" command

func VolumeHealInfoXMLUnmarshall added in v0.2.6

func VolumeHealInfoXMLUnmarshall(cmdOutBuff *bytes.Buffer) (VolumeHealInfoXML, error)

VolumeHealInfoXMLUnmarshall unmarshalls heal info of gluster cluster

type VolumeInfoXML added in v0.2.0

type VolumeInfoXML struct {
	XMLName  xml.Name `xml:"cliOutput"`
	OpRet    int      `xml:"opRet"`
	OpErrno  int      `xml:"opErrno"`
	OpErrstr string   `xml:"opErrstr"`
	VolInfo  VolInfo  `xml:"volInfo"`
}

VolumeInfoXML struct repesents cliOutput element of "gluster volume info" command

func VolumeInfoXMLUnmarshall added in v0.2.0

func VolumeInfoXMLUnmarshall(cmdOutBuff *bytes.Buffer) (VolumeInfoXML, error)

VolumeInfoXMLUnmarshall unmarshalls bytes to VolumeInfoXML struct

type VolumeListXML added in v0.2.0

type VolumeListXML struct {
	XMLName  xml.Name `xml:"cliOutput"`
	OpRet    int      `xml:"opRet"`
	OpErrno  int      `xml:"opErrno"`
	OpErrstr string   `xml:"opErrstr"`
	VolList  VolList  `xml:"volList"`
}

VolumeListXML struct repesents cliOutput element of "gluster volume list" command

func VolumeListXMLUnmarshall added in v0.2.0

func VolumeListXMLUnmarshall(cmdOutBuff *bytes.Buffer) (VolumeListXML, error)

VolumeListXMLUnmarshall unmarshalls bytes to VolumeListXML struct

type VolumeProfileXML added in v0.2.0

type VolumeProfileXML struct {
	XMLName    xml.Name   `xml:"cliOutput"`
	OpRet      int        `xml:"opRet"`
	OpErrno    int        `xml:"opErrno"`
	OpErrstr   string     `xml:"opErrstr"`
	VolProfile VolProfile `xml:"volProfile"`
}

VolumeProfileXML struct repesents cliOutput element of "gluster volume {volume} profile" command

func VolumeProfileGvInfoCumulativeXMLUnmarshall added in v0.2.0

func VolumeProfileGvInfoCumulativeXMLUnmarshall(cmdOutBuff *bytes.Buffer) (VolumeProfileXML, error)

VolumeProfileGvInfoCumulativeXMLUnmarshall unmarshalls cumulative profile of gluster volume profile

type VolumeQuotaXML added in v0.2.7

type VolumeQuotaXML struct {
	XMLName  xml.Name `xml:"cliOutput"`
	OpRet    int      `xml:"opRet"`
	OpErrno  int      `xml:"opErrno"`
	OpErrstr string   `xml:"opErrstr"`
	VolQuota VolQuota `xml:"volQuota"`
}

VolumeQuotaXML XML type of "gluster volume quota list"

func VolumeQuotaListXMLUnmarshall added in v0.2.7

func VolumeQuotaListXMLUnmarshall(cmdOutBuff *bytes.Buffer) (VolumeQuotaXML, error)

type VolumeStatusXML added in v0.2.5

type VolumeStatusXML struct {
	XMLName   xml.Name `xml:"cliOutput"`
	OpRet     int      `xml:"opRet"`
	OpErrno   int      `xml:"opErrno"`
	OpErrstr  string   `xml:"opErrstr"`
	VolStatus struct {
		Volumes struct {
			Volume []struct {
				VolName   string `xml:"volName"`
				NodeCount int    `xml:"nodeCount"`
				Node      []struct {
					Hostname string `xml:"hostname"`
					Path     string `xml:"path"`
					PeerID   string `xml:"peerid"`
					Status   int    `xml:"status"`
					Port     int    `xml:"port"`
					Ports    struct {
						TCP  int    `xml:"tcp"`
						RDMA string `xml:"rdma"`
					} `xml:"ports"`
					Pid        int    `xml:"pid"`
					SizeTotal  uint64 `xml:"sizeTotal"`
					SizeFree   uint64 `xml:"sizeFree"`
					Device     string `xml:"device"`
					BlockSize  int    `xml:"blockSize"`
					MntOptions string `xml:"mntOptions"`
					FsName     string `xml:"fsName"`
				} `xml:"node"`
			} `xml:"volume"`
		} `xml:"volumes"`
	} `xml:"volStatus"`
}

VolumeStatusXML XML type of "gluster volume status"

func VolumeStatusAllDetailXMLUnmarshall added in v0.2.5

func VolumeStatusAllDetailXMLUnmarshall(cmdOutBuff *bytes.Buffer) (VolumeStatusXML, error)

VolumeStatusAllDetailXMLUnmarshall reads bytes.buffer and returns unmarshalled xml

type Volumes

type Volumes struct {
	XMLName xml.Name `xml:"volumes"`
	Volume  []Volume `xml:"volume"`
	Count   int      `xml:"count"`
}

Volumes element of "gluster volume info" command

Jump to

Keyboard shortcuts

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