cmd

package
v0.2.12-beta-0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package cmd is the base package for various sets of builds and executables created from go-spacemesh

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the app's semantic version. Designed to be overwritten by make.
	Version string

	// Branch is the git branch used to build the App. Designed to be overwritten by make.
	Branch string

	// Commit is the git commit used to build the app. Designed to be overwritten by make.
	Commit string
)

Functions

func AddCommands

func AddCommands(cmd *cobra.Command)

AddCommands adds cobra commands to the app.

func Cancel

func Cancel() func()

Cancel returns global cancellation function.

func Ctx

func Ctx() context.Context

Ctx returns global context.

func EnsureCLIFlags

func EnsureCLIFlags(cmd *cobra.Command, appCFG *bc.Config) error

EnsureCLIFlags checks flag types and converts them.

func SetCancel

func SetCancel(cancelFunc func())

SetCancel sets global cancellation function.

func SetCtx

func SetCtx(ctx context.Context)

SetCtx sets global context.

Types

type BaseApp

type BaseApp struct {
	Config *bc.Config
}

BaseApp is the base application command, provides basic init and flags for all executables and applications.

func NewBaseApp

func NewBaseApp() *BaseApp

NewBaseApp returns new basic application.

func (*BaseApp) Initialize

func (app *BaseApp) Initialize(cmd *cobra.Command)

Initialize loads config, sets logger and listens to Ctrl ^C.

Directories

Path Synopsis
package hare is the tester executable running instances of hare consensus algorithm
package hare is the tester executable running instances of hare consensus algorithm
Package integration provides RPC testing harness for executing and interacting with full node
Package integration provides RPC testing harness for executing and interacting with full node
package multi_node_sim is an implementation of a framework running multiple nodes in same executable with fast hare implementation.
package multi_node_sim is an implementation of a framework running multiple nodes in same executable with fast hare implementation.
Package node contains the main executable for go-spacemesh node
Package node contains the main executable for go-spacemesh node
package p2p cmd is the main executable for running p2p tests and simulations
package p2p cmd is the main executable for running p2p tests and simulations

Jump to

Keyboard shortcuts

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