thegraph

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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 GetDockerClient() *client.Client

func GetDockerLog

func GetDockerLog(conn *websocket.Conn, containerName string)

GetDockerLog 获取容器日志的websocket

func GetWebSocket

func GetWebSocket(conn *websocket.Conn, containerName string)

GetWebSocket 获取容器执行的websocket

func InstallDocker

func InstallDocker() error

InstallDocker install docker

func IsServer

func IsServer() bool

func SetIsServer

func SetIsServer(status bool)

func Uninstall

func Uninstall() error

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL