Documentation ¶
Index ¶
- Constants
- func CheckComponents(c Component, parameters []*ComponentParameters) error
- func DockerStatus(ip string, name string) (bool, error)
- func IsRunning(client *ssh.SSHClient, c SystemComponent) (bool, error)
- func ReStart(client *ssh.SSHClient, c SystemComponent) error
- func Start(client *ssh.SSHClient, c SystemComponent) error
- func Stop(client *ssh.SSHClient, c SystemComponent) error
- func SystemStatus(client *ssh.SSHClient, c SystemComponent) (string, error)
- func Uninstall(client *ssh.SSHClient, c SystemComponent) error
- func UntarInstalledPackage(client *ssh.SSHClient, compressedFilePath, aimPath string) error
- type Component
- type ComponentParameters
- type OperateType
- type ParameterType
- type Product
- type ProductDepends
- type ProductSystemdComponentDepend
- type ServiceComponent
- type SystemComponent
Constants ¶
View Source
const ( Running = "active (running)" Dead = "inactive (dead)" Unknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func CheckComponents ¶
func CheckComponents(c Component, parameters []*ComponentParameters) error
func SystemStatus ¶
func SystemStatus(client *ssh.SSHClient, c SystemComponent) (string, error)
Types ¶
type Component ¶
type Component interface { GetCode() string GetName() string DownloadURL() string Parameters() []*ComponentParameters }
type ComponentParameters ¶
type ComponentParameters struct { ParameterType ParameterType ParameterName string ParameterValue string }
type OperateType ¶
type OperateType uint8
const ( OperateType_Start OperateType OperateType_Restart OperateType_Stop )
type ParameterType ¶
type ParameterType uint8
const ( Dir ParameterType //选择路径 1 FilePath //选择文件 2 Server //选择服务器 3 )
type Product ¶
type Product interface { GetName() string GetCode() string GetDepends() []*ProductSystemdComponentDepend ServicesList() map[string]ServiceComponent }
type ProductDepends ¶
type ProductDepends struct {
Depends []*ProductSystemdComponentDepend
}
func (*ProductDepends) Scan ¶
func (m *ProductDepends) Scan(v interface{}) error
type ServiceComponent ¶
type ServiceComponent interface { Component NeedInit() bool Init(depends []*ProductSystemdComponentDepend) error DockerRun(version string, parameters []*ComponentParameters) string ImageName() string }
Click to show internal directories.
Click to hide internal directories.