cmd

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentPrefix = "AG"
)

Variables

View Source
var CurrentPeersCmd = &cobra.Command{
	Use:   "current",
	Short: "Get current peers list",
	Run:   execCurrentPeers,
}

Functions

func Execute

func Execute()

func GetClient

func GetClient(serverAddr string, opts []grpc.DialOption) interface{}

func GetServerAddress

func GetServerAddress() string

GetServerAddress return ip address and port of server

Types

type CliConfig

type CliConfig struct {
	Host string `mapstructure:"host" description:"Target server host. default is localhost"`
	Port int    `mapstructure:"port" description:"Target server port. default is 8915"`
}

CliConfig is configs for aergo cli.

type CliContext

type CliContext struct {
	config.BaseContext
}

func NewCliContext

func NewCliContext(homePath string, configFilePath string) *CliContext

func (*CliContext) GetConfigFileName

func (ctx *CliContext) GetConfigFileName() string

func (*CliContext) GetDefaultConfig

func (ctx *CliContext) GetDefaultConfig() interface{}

GetDefaultConfig return cliconfig with default value. It ALWAYS returns NEW object.

func (*CliContext) GetHomePath

func (ctx *CliContext) GetHomePath() string

func (*CliContext) GetTemplate

func (ctx *CliContext) GetTemplate() string

type JSONPolarisPeer

type JSONPolarisPeer struct {
	*PolarisPeerAlias
	Connected time.Time `json:"connected"`
	LastCheck time.Time `json:"lastCheck"`
}

JSONPolarisPeer is simple wrapper to print human readable json output.

func NewJSONPolarisPeer

func NewJSONPolarisPeer(pp *types.PolarisPeer) JSONPolarisPeer

type PolarisClient

type PolarisClient struct {
	types.PolarisRPCServiceClient
	// contains filtered or unexported fields
}

func (*PolarisClient) Close

func (c *PolarisClient) Close()

type PolarisPeerAlias

type PolarisPeerAlias types.PolarisPeer

Jump to

Keyboard shortcuts

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