startnode

package
v0.0.0-...-667e438 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Final

func Final()

func GetNode

func GetNode() *node.NodeEngine

func InitFabricNode

func InitFabricNode() error

func InitLogger

func InitLogger(module string) *logging.Logger

deprecated: use the local package in peerex/logging

func PreInitFabricNode

func PreInitFabricNode(ctx context.Context, name string)

func RunFabricNode

func RunFabricNode() (error, func(ctx context.Context))

func RunNode

func RunNode(ncfg *NodeConfig)

mimic peer.main()

Types

type GlobalConfig

type GlobalConfig struct {
	EnvPrefix          string
	ConfigFileName     string
	ConfigPath         []string
	SkipConfigFile     bool
	NotUseSourceConfig bool
	DefaultSetting     map[string]interface{}

	Perf PerformanceTuning

	LogRole string //peer, node, network, chaincode, version, can apply different log level from config file
}

func (*GlobalConfig) Apply

func (g *GlobalConfig) Apply() error

type NodeConfig

type NodeConfig struct {
	Settings map[string]interface{}
	//call after preinit and before init, for adjusting the configurations
	//in node
	Schemes func(*node.NodeEngine)
	//will be call after init and before running, to execute additional works,
	//e.g. prepare the chaincodes, etc
	PostRun func() error
	//instead of the general guard function, being call after node is running,
	//and node will be stop after this function is returned
	TaskRun func()
	// contains filtered or unexported fields
}

func (*NodeConfig) PreConfig

func (ncfg *NodeConfig) PreConfig() error

execute config first, so user can use viper and some config modules and log

func (*NodeConfig) SetPreConfig

func (ncfg *NodeConfig) SetPreConfig(cfg *GlobalConfig)

type PerformanceTuning

type PerformanceTuning struct {
	MaxProcs int
}

func (*PerformanceTuning) Apply

func (p *PerformanceTuning) Apply()

Jump to

Keyboard shortcuts

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