cmd

package
v0.0.0-...-bcff216 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

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

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

	// Ctx is the node's main context.
	Ctx, _ = context.WithCancel(context.Background())

	// Cancel is a function used to initiate graceful shutdown.
	Cancel = cancel
)

Functions

func AddCommands

func AddCommands(cmd *cobra.Command)

AddCommands adds cobra commands to the app.

func EnsureCLIFlags

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

EnsureCLIFlags checks flag types and converts them

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 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