Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CephExecutor ¶
CephExecutor implementation
func NewCephExecutor ¶
func NewCephExecutor(keyringFile, confFile string) *CephExecutor
func (*CephExecutor) Execute ¶
func (e *CephExecutor) Execute(command string, args []string, opts ...ExecuteOption) (*ExecuteResult, error)
type ExecuteOption ¶
type ExecuteOption func(*executeOptions)
ExecuteOption defines the function type for execution options
func WithOutputFormat ¶
func WithOutputFormat(format string) ExecuteOption
func WithTimeout ¶
func WithTimeout(seconds int) ExecuteOption
func WithVerbose ¶
func WithVerbose() ExecuteOption
type ExecuteResult ¶
type ExecuteResult struct {
Command string `json:"command"`
Args []string `json:"args"`
Output string `json:"output"`
Error string `json:"error,omitempty"`
ExitCode int `json:"exit_code"`
}
ExecuteResult defines the execution result
type Executor ¶
type Executor interface {
Execute(command string, args []string, opts ...ExecuteOption) (*ExecuteResult, error)
}
Command executor interface
Click to show internal directories.
Click to hide internal directories.