pod

package
v1.9.25 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Unlicense Imports: 20 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var F, E, W, I, D, T logg.LevelPrinter = logg.GetLogPrinterSet(subsystem)

Functions

func GetContext added in v1.9.25

func GetContext(cx *State) *chainrpc.Context

Types

type Field

type Field struct {
	Datatype    string   `json:"datatype"`
	Description string   `json:"help"`
	Featured    string   `json:"featured"`
	Group       string   `json:"group"`
	Hooks       string   `json:"hooks"`
	Label       string   `json:"label"`
	Model       string   `json:"model"`
	Options     []string `json:"options"`
	Restart     string   `json:"restart"`
	Slug        string   `json:"slug"`
	Type        string   `json:"type"`
	Widget      string   `json:"inputType"`
}

type Fields added in v0.4.14

type Fields []Field

func (Fields) Len added in v0.4.14

func (f Fields) Len() int

func (Fields) Less added in v0.4.14

func (f Fields) Less(i, j int) bool

func (Fields) Swap added in v0.4.14

func (f Fields) Swap(i, j int)

type Group

type Group struct {
	Legend string `json:"legend"`
	Fields `json:"fields"`
}

type Groups added in v0.4.14

type Groups []Group

type Schema

type Schema struct {
	Groups Groups `json:"groups"`
}

func GetConfigSchema

func GetConfigSchema(cfg *podcfg.Config) Schema

GetConfigSchema returns a schema for a given config

type State added in v1.9.25

type State struct {
	sync.Mutex
	WaitGroup sync.WaitGroup
	KillAll   qu.C
	// App is the heart of the application system, this creates and initialises it.
	App *cli.App
	// AppContext is the urfave/cli app context
	AppContext *cli.Context
	// Config is the pod all-in-one server config
	Config *podcfg.Config
	// ConfigMap
	ConfigMap map[string]interface{}
	// StateCfg is a reference to the main node state configuration struct
	StateCfg *state.Config
	// ActiveNet is the active net parameters
	ActiveNet *chaincfg.Params
	// Language libraries
	Language *lang.Lexicon
	// // DataDir is the default data dir
	// DataDir string
	// Node is the run state of the node
	Node atomic.Bool
	// NodeReady is closed when it is ready then always returns
	NodeReady qu.C
	// NodeKill is the killswitch for the Node
	NodeKill qu.C
	// Wallet is the run state of the wallet
	Wallet atomic.Bool
	// WalletKill is the killswitch for the Wallet
	WalletKill qu.C
	// RPCServer is needed to directly query data
	RPCServer *chainrpc.Server
	// NodeChan relays the chain RPC server to the main
	NodeChan chan *chainrpc.Server
	// WalletServer is needed to query the wallet
	WalletServer *wallet.Wallet
	// ChainClientReady signals when the chain client is ready
	ChainClientReady qu.C
	// ChainClient is the wallet's chain RPC client
	ChainClient *chainclient.RPCClient
	// RealNode is the main node
	RealNode *chainrpc.Node
	// Hashrate is the current total hashrate from kopach workers taking work from this node
	Hashrate atomic.Uint64
	// Controller is the state of the controller
	Controller *control.State
	// OtherNodesCounter is the count of nodes connected automatically on the LAN
	OtherNodesCounter atomic.Int32
	// IsGUI indicates if we have the possibility of terminal input
	IsGUI bool

	Syncing *atomic.Bool
	// contains filtered or unexported fields
}

State stores all the common state data used in pod

func GetNewContext added in v1.9.25

func GetNewContext(appName, appLang, subtext string) *State

GetNewContext returns a fresh new context

func (*State) IsCurrent added in v1.9.25

func (cx *State) IsCurrent() (is bool)

func (*State) PrintWaitChangers added in v1.9.25

func (cx *State) PrintWaitChangers() string

func (*State) WaitAdd added in v1.9.25

func (cx *State) WaitAdd()

func (*State) WaitDone added in v1.9.25

func (cx *State) WaitDone()

func (*State) WaitWait added in v1.9.25

func (cx *State) WaitWait()

Jump to

Keyboard shortcuts

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