mirror of
https://github.com/ceph/go-ceph
synced 2024-12-22 06:10:09 +00:00
common commands: add new sub-package for common interface types
Add new common interface types for working with Ceph's "JSON commands" to a public sub-package. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
8e4b8349aa
commit
e8e1d722c8
7
common/commands/doc.go
Normal file
7
common/commands/doc.go
Normal file
@ -0,0 +1,7 @@
|
||||
/*
|
||||
Package commands provides types and utility functions that are used for
|
||||
interfacing with the JSON based command infrastructure in Ceph.
|
||||
|
||||
The *rados.Conn type implements many of the interfaces found in this package.
|
||||
*/
|
||||
package commands
|
20
common/commands/interfaces.go
Normal file
20
common/commands/interfaces.go
Normal file
@ -0,0 +1,20 @@
|
||||
package commands
|
||||
|
||||
// MgrCommander in an interface for the API needed to execute JSON formatted
|
||||
// commands on the ceph mgr.
|
||||
type MgrCommander interface {
|
||||
MgrCommand(buf [][]byte) ([]byte, string, error)
|
||||
}
|
||||
|
||||
// MonCommander is an interface for the API needed to execute JSON formatted
|
||||
// commands on the ceph mon(s).
|
||||
type MonCommander interface {
|
||||
MonCommand(buf []byte) ([]byte, string, error)
|
||||
}
|
||||
|
||||
// RadosCommander provides an interface for APIs needed to execute JSON
|
||||
// formatted commands on the Ceph cluster.
|
||||
type RadosCommander interface {
|
||||
MgrCommander
|
||||
MonCommander
|
||||
}
|
Loading…
Reference in New Issue
Block a user