Documentation
¶
Index ¶
- Constants
- func Deploy(data DeployParams) error
- func GetDockerClient() *client.Client
- func GetDockerLog(conn *websocket.Conn, containerName string)
- func GetWebSocket(conn *websocket.Conn, containerName string)
- func InstallDocker() error
- func IsServer() bool
- func SetIsServer(status bool)
- func Uninstall() error
- type ComposeStatus
- type DeployParams
- type DockerBean
Constants ¶
View Source
const ( STOP = 0 RUNNING = 1 SOME_EXITED = 2 )
Variables ¶
This section is empty.
Functions ¶
func Deploy ¶
func Deploy(data DeployParams) error
func GetDockerClient ¶
func GetDockerLog ¶
GetDockerLog 获取容器日志的websocket
func GetWebSocket ¶
GetWebSocket 获取容器执行的websocket
func SetIsServer ¶
func SetIsServer(status bool)
Types ¶
type ComposeStatus ¶
type ComposeStatus int
func GetDockerComposeStatus ¶
func GetDockerComposeStatus(containerIDs ...string) (ComposeStatus, error)
type DeployParams ¶
type DeployParams struct {
NodeEthereumUrl string `json:"nodeEthereumUrl"` //graph-node eth-url
EthereumUrl string `json:"ethereumUrl"` //indexer-service、indexer-agent eth-url
EthereumNetwork string `json:"ethereumNetwork"` //eth network
IndexerAddress string `json:"indexerAddress"` //indexer address
Mnemonic string `json:"mnemonic"` // mnemonic
}
type DockerBean ¶
type DockerBean struct {
ID int `gorm:"primary_key" json:"id"`
Title string `json:"title"`
ImageName string `json:"image_name"`
PortBind string `json:"port_bind"`
PortExport string `json:"port_export"`
ContainerName string `json:"container_name"`
ContainerId string `json:"container_id"`
Mark string `json:"mark"`
Status int `json:"status"` // 1 start, 2 停止
Shell string `json:"shell"`
UserId int `json:"user_id"`
CreateTime string `json:"create_time"`
UpdateTime string `json:"update_time"`
}
Click to show internal directories.
Click to hide internal directories.