thegraph

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STOP        = 0
	RUNNING     = 1
	SOME_EXITED = 2
)

Variables

This section is empty.

Functions

func ComposeGraphConnect added in v1.3.0

func ComposeGraphConnect(composeFilePathName string) error

func ComposeGraphRules added in v1.3.0

func ComposeGraphRules(composeFilePathName string) (result []map[string]interface{}, err error)

func ComposeGraphStart added in v1.3.0

func ComposeGraphStart(composeFilePathName string, deploymentID string) error

func ComposeGraphStop added in v1.3.0

func ComposeGraphStop(composeFilePathName string, deploymentID string) error

func DefaultComposeGraphConnect added in v1.3.0

func DefaultComposeGraphConnect() error

func DefaultComposeGraphRules added in v1.3.0

func DefaultComposeGraphRules() (result []map[string]interface{}, err error)

func DefaultComposeGraphStart added in v1.3.0

func DefaultComposeGraphStart(deploymentID ...string) error

func DefaultComposeGraphStop added in v1.3.0

func DefaultComposeGraphStop(deploymentID ...string) error

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 IsServer

func IsServer() bool

func PullImage added in v1.3.0

func PullImage() error

func SetIsServer

func SetIsServer(status bool)

func Uninstall

func Uninstall() error

func VerifyWithSS58 added in v1.3.0

func VerifyWithSS58(ss58 string, data []byte, sign []byte) bool

func VerifyWithSS58AndHexSign added in v1.3.0

func VerifyWithSS58AndHexSign(ss58, data, signHex string) 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"`
}

Jump to

Keyboard shortcuts

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