config

package
v0.0.3-generatorpow Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: GPL-3.0 Imports: 7 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	KafkaProducers []*KafkaProducer
	OpenBlackBlock bool
}

type Config

type Config struct {
	*Producer `json:"Producer"`
	*Chain    `json:"Chain"`
	*Vm       `json:"Vm"`
	*Net      `json:"Net"`

	// global keys
	DataDir string `json:"DataDir"`
	//Log level
	LogLevel string `json:"LogLevel"`
}
var GlobalConfig *Config

func (Config) RunLogDir

func (c Config) RunLogDir() string

func (Config) RunLogDirFile

func (c Config) RunLogDirFile() (string, error)

type KafkaProducer

type KafkaProducer struct {
	BrokerList []string
	Topic      string
}

type Net

type Net struct {
	Single       bool     `json:"Single"`
	FilePort     uint16   `json:"Port"`
	Topology     []string `json:"Topology"`
	Topic        string   `json:"Topic"`
	Interval     int64    `json:"Interval"`
	TopoDisabled bool     `json:"TopoDisabled"`
}

type P2P

type P2P struct {
	Name string `json:"Names""`

	// use for sign data
	PrivateKey string `json:"PrivateKey"`

	// `MaxPeers` is the maximum number of peers that can be connected.
	MaxPeers uint `json:"MaxPeers"`

	// `MaxPassivePeersRatio` is the ratio of MaxPeers that initiate an active connection to this node.
	// the actual value is `MaxPeers / MaxPassivePeersRatio`
	MaxPassivePeersRatio uint `json:"MaxPassivePeersRatio"`

	// `MaxPendingPeers` is the maximum number of peers that wait to connect.
	MaxPendingPeers uint `json:"MaxPendingPeers"`

	BootNodes []string `json:"BootNodes"`

	Port uint `json:"Port"`

	Datadir string `json:"Datadir"`

	NetID uint `json:"NetID"`
}

type Producer

type Producer struct {
	Producer         bool   `json:"Producer"`
	Coinbase         string `json:"Coinbase"`
	EntropyStorePath string `json:"EntropyStorePath"`
}

type Vm

type Vm struct {
	IsVmTest         bool `json:"IsVmTest"`
	IsUseVmTestParam bool `json:"IsUseVmTestParam"`
}

Jump to

Keyboard shortcuts

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