common admin: add admin.go file with basic admin type

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2022-01-18 13:43:11 -05:00 committed by mergify[bot]
parent 4fa966d579
commit 73bbdbfe08
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
package manager
import (
ccom "github.com/ceph/go-ceph/common/commands"
)
// MgrAdmin is used to administrate ceph's manager (mgr).
type MgrAdmin struct {
conn ccom.RadosCommander
}
// NewFromConn creates an new management object from a preexisting
// rados connection. The existing connection can be rados.Conn or any
// type implementing the RadosCommander interface.
func NewFromConn(conn ccom.RadosCommander) *MgrAdmin {
return &MgrAdmin{conn}
}