cmd

package
v0.2.18-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 18 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 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 node contains the main executable for go-spacemesh node
Package node contains the main executable for go-spacemesh node

Jump to

Keyboard shortcuts

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