mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: bump github.com/ceph/go-ceph from 0.11.0 to 0.12.0
Bumps [github.com/ceph/go-ceph](https://github.com/ceph/go-ceph) from 0.11.0 to 0.12.0. - [Release notes](https://github.com/ceph/go-ceph/releases) - [Changelog](https://github.com/ceph/go-ceph/blob/master/docs/release-process.md) - [Commits](https://github.com/ceph/go-ceph/compare/v0.11.0...v0.12.0) --- updated-dependencies: - dependency-name: github.com/ceph/go-ceph dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
fedbb01ec3
commit
a66012a5d4
16
vendor/github.com/ceph/go-ceph/rados/conn.go
generated
vendored
16
vendor/github.com/ceph/go-ceph/rados/conn.go
generated
vendored
@ -14,6 +14,8 @@ import (
|
||||
|
||||
var argvPlaceholder = "placeholder"
|
||||
|
||||
//revive:disable:var-naming old-yet-exported public api
|
||||
|
||||
// ClusterStat represents Ceph cluster statistics.
|
||||
type ClusterStat struct {
|
||||
Kb uint64
|
||||
@ -22,6 +24,8 @@ type ClusterStat struct {
|
||||
Num_objects uint64
|
||||
}
|
||||
|
||||
//revive:enable:var-naming
|
||||
|
||||
// Conn is a connection handle to a Ceph cluster.
|
||||
type Conn struct {
|
||||
cluster C.rados_t
|
||||
@ -67,7 +71,7 @@ func (c *Conn) Connect() error {
|
||||
|
||||
// Shutdown disconnects from the cluster.
|
||||
func (c *Conn) Shutdown() {
|
||||
if err := c.ensure_connected(); err != nil {
|
||||
if err := c.ensureConnected(); err != nil {
|
||||
return
|
||||
}
|
||||
freeConn(c)
|
||||
@ -166,7 +170,7 @@ func (c *Conn) WaitForLatestOSDMap() error {
|
||||
return getError(ret)
|
||||
}
|
||||
|
||||
func (c *Conn) ensure_connected() error {
|
||||
func (c *Conn) ensureConnected() error {
|
||||
if c.connected {
|
||||
return nil
|
||||
}
|
||||
@ -176,7 +180,7 @@ func (c *Conn) ensure_connected() error {
|
||||
// GetClusterStats returns statistics about the cluster associated with the
|
||||
// connection.
|
||||
func (c *Conn) GetClusterStats() (stat ClusterStat, err error) {
|
||||
if err := c.ensure_connected(); err != nil {
|
||||
if err := c.ensureConnected(); err != nil {
|
||||
return ClusterStat{}, err
|
||||
}
|
||||
cStat := C.struct_rados_cluster_stat_t{}
|
||||
@ -269,7 +273,7 @@ func (c *Conn) MakePool(name string) error {
|
||||
|
||||
// DeletePool deletes a pool and all the data inside the pool.
|
||||
func (c *Conn) DeletePool(name string) error {
|
||||
if err := c.ensure_connected(); err != nil {
|
||||
if err := c.ensureConnected(); err != nil {
|
||||
return err
|
||||
}
|
||||
cName := C.CString(name)
|
||||
@ -280,7 +284,7 @@ func (c *Conn) DeletePool(name string) error {
|
||||
|
||||
// GetPoolByName returns the ID of the pool with a given name.
|
||||
func (c *Conn) GetPoolByName(name string) (int64, error) {
|
||||
if err := c.ensure_connected(); err != nil {
|
||||
if err := c.ensureConnected(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
cName := C.CString(name)
|
||||
@ -295,7 +299,7 @@ func (c *Conn) GetPoolByName(name string) (int64, error) {
|
||||
// GetPoolByID returns the name of a pool by a given ID.
|
||||
func (c *Conn) GetPoolByID(id int64) (string, error) {
|
||||
buf := make([]byte, 4096)
|
||||
if err := c.ensure_connected(); err != nil {
|
||||
if err := c.ensureConnected(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
cid := C.int64_t(id)
|
||||
|
Reference in New Issue
Block a user