mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
return static error on unimplemented manager actions
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
package manager
|
||||
|
||||
import "errors"
|
||||
|
||||
var ActionNotImplErr = errors.New("action not implemented")
|
||||
|
||||
type Manager interface {
|
||||
Start() error
|
||||
Stop() error
|
||||
|
||||
@@ -7,29 +7,29 @@ func NewMock() *Mock {
|
||||
}
|
||||
|
||||
func (m *Mock) Start() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (m *Mock) Stop() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (m *Mock) Remove() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (m *Mock) Pause() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (m *Mock) Unpause() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (m *Mock) Restart() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (m *Mock) Exec(cmd []string) error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
@@ -7,29 +7,29 @@ func NewRunc() *Runc {
|
||||
}
|
||||
|
||||
func (rc *Runc) Start() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (rc *Runc) Stop() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (rc *Runc) Remove() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (rc *Runc) Pause() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (rc *Runc) Unpause() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (rc *Runc) Restart() error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
func (rc *Runc) Exec(cmd []string) error {
|
||||
return nil
|
||||
return ActionNotImplErr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user