ceph

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(c HTTPClient) *Client

func (*Client) Index

func (c *Client) Index(ctx context.Context) ([]map[string]interface{}, error)

Index Cluster ceph index.

func (*Client) Metadata

func (c *Client) Metadata(ctx context.Context, req MetadataRequest) (MetadataResponse, error)

Metadata Get ceph metadata.

func (*Client) Status

func (c *Client) Status(ctx context.Context) (map[string]interface{}, error)

Status Get ceph status.

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type Id added in v0.2.0

type Id struct {
	Addr             string `url:"addr" json:"addr"`                             // Bind addresses and ports.
	CephRelease      string `url:"ceph_release" json:"ceph_release"`             // Ceph release codename currently used.
	CephVersion      string `url:"ceph_version" json:"ceph_version"`             // Version info currently used by the service.
	CephVersionShort string `url:"ceph_version_short" json:"ceph_version_short"` // Short version (numerical) info currently used by the service.
	Hostname         string `url:"hostname" json:"hostname"`                     // Hostname on which the service is running.
	MemSwapKb        int    `url:"mem_swap_kb" json:"mem_swap_kb"`               // Memory of the service currently in swap.
	MemTotalKb       int    `url:"mem_total_kb" json:"mem_total_kb"`             // Memory consumption of the service.
	Name             string `url:"name" json:"name"`                             // Name of the service instance.

}

Useful properties are listed, but not the full list.

type Mds added in v0.2.0

type Mds struct {
	Id Id `url:"{id}" json:"{id}"` // Useful properties are listed, but not the full list.

}

Metadata servers configured in the cluster and their properties.

type MetadataRequest

type MetadataRequest struct {

	// The following parameters are optional
	Scope *Scope `url:"scope,omitempty" json:"scope,omitempty"`
}

type MetadataResponse

type MetadataResponse struct {
	Mds  Mds                      `url:"mds" json:"mds"`   // Metadata servers configured in the cluster and their properties.
	Mgr  Mgr                      `url:"mgr" json:"mgr"`   // Managers configured in the cluster and their properties.
	Mon  Mon                      `url:"mon" json:"mon"`   // Monitors configured in the cluster and their properties.
	Node Node                     `url:"node" json:"node"` // Ceph version installed on the nodes.
	Osd  []map[string]interface{} `url:"osd" json:"osd"`   // OSDs configured in the cluster and their properties.

}

Items for each type of service containing objects for each instance.

type Mgr added in v0.2.0

type Mgr struct {
	Id Id `url:"{id}" json:"{id}"` // Useful properties are listed, but not the full list.

}

Managers configured in the cluster and their properties.

type Mon added in v0.2.0

type Mon struct {
	Id Id `url:"{id}" json:"{id}"` // Useful properties are listed, but not the full list.

}

Monitors configured in the cluster and their properties.

type Node added in v0.2.0

type Node struct {
	Buildcommit string  `url:"buildcommit" json:"buildcommit"` // GIT commit used for the build.
	Version     Version `url:"version" json:"version"`         // Version info.

}

type Scope added in v0.0.15

type Scope string
const (
	Scope_ALL      Scope = "all"
	Scope_VERSIONS Scope = "versions"
)

func PtrScope added in v0.0.15

func PtrScope(i Scope) *Scope

type SubId added in v0.2.0

type SubId struct {
	Addr             string `url:"addr" json:"addr"`                             // Bind address
	CephRelease      string `url:"ceph_release" json:"ceph_release"`             // Ceph release codename currently used.
	CephVersion      string `url:"ceph_version" json:"ceph_version"`             // Version info currently used by the service.
	CephVersionShort string `url:"ceph_version_short" json:"ceph_version_short"` // Short version (numerical) info currently used by the service.
	Hostname         string `url:"hostname" json:"hostname"`                     // Hostname on which the service is running.
	MemSwapKb        int    `url:"mem_swap_kb" json:"mem_swap_kb"`               // Memory of the service currently in swap.
	MemTotalKb       int    `url:"mem_total_kb" json:"mem_total_kb"`             // Memory consumption of the service.
	Name             string `url:"name" json:"name"`                             // Name of the service instance.

}

Useful properties are listed, but not the full list.

type SubNode added in v0.2.0

type SubNode struct {
	Node Node `url:"{node}" json:"{node}"`
}

Ceph version installed on the nodes.

type SubSubId added in v0.2.0

type SubSubId struct {
	Addrs            string `url:"addrs" json:"addrs"`                           // Bind addresses and ports.
	CephRelease      string `url:"ceph_release" json:"ceph_release"`             // Ceph release codename currently used.
	CephVersion      string `url:"ceph_version" json:"ceph_version"`             // Version info currently used by the service.
	CephVersionShort string `url:"ceph_version_short" json:"ceph_version_short"` // Short version (numerical) info currently used by the service.
	Hostname         string `url:"hostname" json:"hostname"`                     // Hostname on which the service is running.
	MemSwapKb        int    `url:"mem_swap_kb" json:"mem_swap_kb"`               // Memory of the service currently in swap.
	MemTotalKb       int    `url:"mem_total_kb" json:"mem_total_kb"`             // Memory consumption of the service.
	Name             string `url:"name" json:"name"`                             // Name of the service instance.

}

Useful properties are listed, but not the full list.

type Version added in v0.2.0

type Version struct {
	Parts []map[string]interface{} `url:"parts" json:"parts"` // major, minor & patch
	Str   string                   `url:"str" json:"str"`     // Version as single string.

}

Version info.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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