config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRPCEndPoint  = "127.0.0.1:8888"
	DefaultHTTPEndPoint = "127.0.0.1:8080"
	DefaultLogLevel     = "debug"
)

Variables

View Source
var DefaultNodeConfig = node.Config{
	DataDir: DefaultDataDir(),
	Timer: service_configs.TimerConfig{
		Interval: 500,
	},
	LogLevel:         DefaultLogLevel,
	P2PPort:          20200,
	P2PPortConsensus: 20201,
	P2PSeeds:         []string{},

	GRPC: service_configs.GRPCConfig{
		RPCListen:  DefaultRPCEndPoint,
		HTTPListen: DefaultHTTPEndPoint,
		HTTPCors:   []string{"*"},
		HTTPLimit:  100,
	},
	Consensus: service_configs.ConsensusConfig{
		Type:              "DPoS",
		BootStrap:         true,
		LocalBpName:       constants.INIT_MINER_NAME,
		LocalBpPrivateKey: constants.INITMINER_PRIKEY,
	},
}

DefaultConfig contains reasonable default settings.

Functions

func DefaultDataDir

func DefaultDataDir() string

func WriteNodeConfigFile

func WriteNodeConfigFile(configDirPath string, configName string, config node.Config, mode os.FileMode) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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