utils

package
v0.0.0-...-ef1d62d Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStopMessage

func GetStopMessage(cliContext *common.Cli, filePath string, relayName string, paraChain []string) (string, error)

Types

type CosmosServiceConfig

type CosmosServiceConfig struct {
	ChainID    *string `json:"chain_id"`
	ChainName  *string `json:"chain_name"`
	Key        *string `json:"key"`
	Password   *string `json:"password"`
	PublicGrpc *int    `json:"public_grpc"`
	PublicHTTP *int    `json:"public_http"`
	PublicTCP  *int    `json:"public_tcp"`
	PublicRPC  *int    `json:"public_rpc"`
}

func (*CosmosServiceConfig) EncodeToString

func (cs *CosmosServiceConfig) EncodeToString() (string, error)

func (*CosmosServiceConfig) IsEmpty

func (cc *CosmosServiceConfig) IsEmpty() error

func (*CosmosServiceConfig) LoadConfigFromFile

func (cs *CosmosServiceConfig) LoadConfigFromFile(cliContext *common.Cli, filePath string) error

func (*CosmosServiceConfig) LoadDefaultConfig

func (cs *CosmosServiceConfig) LoadDefaultConfig() error

type HardhatServiceConfig

type HardhatServiceConfig struct {
	PublicPort int `json:"public_port"`
}

func (*HardhatServiceConfig) EncodeToString

func (sc *HardhatServiceConfig) EncodeToString() (string, error)

func (*HardhatServiceConfig) LoadDefaultConfig

func (sc *HardhatServiceConfig) LoadDefaultConfig() error

type IconServiceConfig

type IconServiceConfig struct {
	Port             int    `json:"private_port"`
	PublicPort       int    `json:"public_port"`
	P2PListenAddress string `json:"p2p_listen_address"`
	P2PAddress       string `json:"p2p_address"`
	Cid              string `json:"cid"`
}

func (*IconServiceConfig) EncodeToString

func (sc *IconServiceConfig) EncodeToString() (string, error)

func (*IconServiceConfig) IsEmpty

func (sc *IconServiceConfig) IsEmpty() error

func (*IconServiceConfig) LoadConfigFromFile

func (sc *IconServiceConfig) LoadConfigFromFile(cliContext *common.Cli, filePath string) error

func (*IconServiceConfig) LoadDefaultConfig

func (sc *IconServiceConfig) LoadDefaultConfig() error

type Key

type Key struct {
	PrivatePhrase string `json:"private_phrase"`
	PublicKey     string `json:"public_key"`
}

type NodeConfig

type NodeConfig struct {
	Name       string `json:"name"`
	NodeType   string `json:"node_type"`
	Prometheus bool   `json:"prometheus"`
	Ports      Ports  `json:"ports"`
	Key        Key    `json:"key,omitempty"`
}

func (*NodeConfig) AssignPorts

func (nc *NodeConfig) AssignPorts(prometheus bool, chainName string) error

func (*NodeConfig) IsEmpty

func (nc *NodeConfig) IsEmpty() error

type ParaNodeConfig

type ParaNodeConfig struct {
	Name    string       `json:"name"`
	Nodes   []NodeConfig `json:"nodes"`
	SudoKey Key          `json:"sudo_key,omitempty"`
}

func (*ParaNodeConfig) EncodeToString

func (pc *ParaNodeConfig) EncodeToString() (string, error)

func (*ParaNodeConfig) IsEmpty

func (pnc *ParaNodeConfig) IsEmpty() error

type ParaNodeConfigList

type ParaNodeConfigList []ParaNodeConfig

func (ParaNodeConfigList) EncodeToString

func (pc ParaNodeConfigList) EncodeToString() (string, error)

type PolkadotServiceConfig

type PolkadotServiceConfig struct {
	ChainType           string           `json:"chain_type"`
	RelayChain          RelayChainConfig `json:"relaychain"`
	Para                []ParaNodeConfig `json:"parachains"`
	Explorer            bool             `json:"explorer"`
	WithoutRegistration bool             `json:"without_registration"`
}

func (*PolkadotServiceConfig) ConfigureFullNodes

func (sc *PolkadotServiceConfig) ConfigureFullNodes(network string)

func (*PolkadotServiceConfig) ConfigureMetrics

func (sc *PolkadotServiceConfig) ConfigureMetrics()

func (*PolkadotServiceConfig) EncodeToString

func (sc *PolkadotServiceConfig) EncodeToString() (string, error)

func (*PolkadotServiceConfig) GetParamsForRelay

func (sc *PolkadotServiceConfig) GetParamsForRelay() (string, error)

func (*PolkadotServiceConfig) HasPrometheus

func (sc *PolkadotServiceConfig) HasPrometheus() bool

func (*PolkadotServiceConfig) IsEmpty

func (psc *PolkadotServiceConfig) IsEmpty() error

func (*PolkadotServiceConfig) LoadConfigFromFile

func (sc *PolkadotServiceConfig) LoadConfigFromFile(cliContext *common.Cli, filePath string) error

func (*PolkadotServiceConfig) LoadDefaultConfig

func (sc *PolkadotServiceConfig) LoadDefaultConfig() error

func (*PolkadotServiceConfig) ValidateConfig

func (sc *PolkadotServiceConfig) ValidateConfig() error

type Ports

type Ports struct {
	RPCPort        int `json:"rpc_port"`
	Lib2LibPort    int `json:"lib2lib_port"`
	PrometheusPort int `json:"prometheus_port,omitempty"`
	WSPort         int `json:"ws_port,omitempty"`
}

type RelayChainConfig

type RelayChainConfig struct {
	Name  string       `json:"name,omitempty"`
	Nodes []NodeConfig `json:"nodes,omitempty"`
}

func (*RelayChainConfig) EncodeToString

func (rc *RelayChainConfig) EncodeToString() (string, error)

func (*RelayChainConfig) IsEmpty

func (rcc *RelayChainConfig) IsEmpty() error

Jump to

Keyboard shortcuts

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