cli

package
v0.0.0-...-77652f2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Run        = "run"
	UpdateEtcd = "update-config"
)

Variables

This section is empty.

Functions

func BuildContractEventSubscription

func BuildContractEventSubscription(web3GolangHelper *web3helper.Web3GolangHelper, contractAddress string, logs chan types.Log) ethereum.Subscription

func ErrorFromString

func ErrorFromString(str string) error

func GenerateAddressFromPlainPrivateKey

func GenerateAddressFromPlainPrivateKey(pk string) (common.Address, error)

func GetEtcdConfig

func GetEtcdConfig() *config.Config

func GetSysInfo

func GetSysInfo() string

func HashSkein1024

func HashSkein1024(data []byte) []byte

func HashValue

func HashValue(value string) string

func InitServer

func InitServer(octx context.Context, notify *chan struct{})

func InitWeb3

func InitWeb3()

func PrintNetworkStatus

func PrintNetworkStatus()

func PrintSystemInfo

func PrintSystemInfo(numCpu, usedCpu int)

func PrintUserBalance

func PrintUserBalance(address string, balance int)

func PrintUserBalance2

func PrintUserBalance2(address string, balance int)

func RunServer

func RunServer()

func UpdateEtcdConf

func UpdateEtcdConf()

Types

type Args

type Args struct {
	// contains filtered or unexported fields
}

type Bit2EvmCommand

type Bit2EvmCommand struct {
	// contains filtered or unexported fields
}

func (*Bit2EvmCommand) ExecCommand

func (c *Bit2EvmCommand) ExecCommand(ctx context.Context, args []string) error

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

func New

func New() *CLI

func (*CLI) Run

func (c *CLI) Run() error

type Command

type Command = acmd.Command

type Conf

type Conf struct {
	Revision uint32 `yaml:"revision"`
	Etcd     Etcd   `yaml:"etcd"`
	Server   Server `yaml:"server"`
	Crypto   Crypto `yaml:"crypto"`
	Nodes    []Node `yaml:"nodes"`
}

func GetConf

func GetConf() *Conf

type CreateCommand

type CreateCommand struct {
	// contains filtered or unexported fields
}

func (*CreateCommand) ExecCommand

func (c *CreateCommand) ExecCommand(ctx context.Context, args []string) error

type Crypto

type Crypto struct {
	Type string `yaml:"type"`
	Key  string `yaml:"key"`
}

type DeployCommand

type DeployCommand struct {
	// contains filtered or unexported fields
}

func (*DeployCommand) ExecCommand

func (c *DeployCommand) ExecCommand(ctx context.Context, args []string) error

type Etcd

type Etcd struct {
	Endpoints []string `yaml:"endpoints"`
	Timeout   uint32   `yaml:"timeout"`
}

type Evm2BitCommand

type Evm2BitCommand struct {
	// contains filtered or unexported fields
}

func (*Evm2BitCommand) ExecCommand

func (c *Evm2BitCommand) ExecCommand(ctx context.Context, args []string) error

type InfoCommand

type InfoCommand struct {
	// contains filtered or unexported fields
}

func (*InfoCommand) ExecCommand

func (c *InfoCommand) ExecCommand(ctx context.Context, args []string) error

type Node

type Node struct {
	Node NodeInfo `yaml:"node"`
}

type NodeCommand

type NodeCommand struct {
	// contains filtered or unexported fields
}

func (*NodeCommand) ExecCommand

func (c *NodeCommand) ExecCommand(ctx context.Context, args []string) error

func (*NodeCommand) Run

func (c *NodeCommand) Run() error

func (*NodeCommand) UpdateEtcd

func (c *NodeCommand) UpdateEtcd()

type NodeInfo

type NodeInfo struct {
	Name             string   `yaml:"name"`
	Address          string   `yaml:"address"`
	PrivateAddresses []string `yaml:"privateAddresses"`
	PrivateSubnets   []string `yaml:"privateSubnets"`
}

type Server

type Server struct {
	Keepalive uint32 `yaml:"keepalive"`
	Insecure  bool   `yaml:"insecure"`
	Mtu       uint32 `yaml:"mtu"`
}

type UploadCommand

type UploadCommand struct {
	// contains filtered or unexported fields
}

func (*UploadCommand) ExecCommand

func (c *UploadCommand) ExecCommand(ctx context.Context, args []string) error

Jump to

Keyboard shortcuts

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