config

package
v0.0.0-...-2cf7c70 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MINGENBLOCKTIME        = 2
	DEFAULTGENBLOCKTIME    = 6
	DefaultConfigFilename  = "./config.json"
	DefaultBookKeeperCount = 4
)
View Source
const (
	ConsensusTime      = 10 * time.Second
	ProposerChangeTime = time.Minute
)

Variables

View Source
var (
	Version    string
	Parameters *Configuration
)

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Magic                int64    `json:"Magic"`
	Version              int      `json:"Version"`
	SeedList             []string `json:"SeedList"`
	BookKeepers          []string `json:"BookKeepers"`
	RestCertPath         string   `json:"RestCertPath"`
	RestKeyPath          string   `json:"RestKeyPath"`
	RPCCert              string   `json:"RPCCert"`
	RPCKey               string   `json:"RPCKey"`
	HttpInfoPort         uint16   `json:"HttpInfoPort"`
	HttpInfoStart        bool     `json:"HttpInfoStart"`
	HttpWsPort           uint16   `json:"HttpWsPort"`
	HttpJsonPort         uint16   `json:"HttpJsonPort"`
	NodePort             uint16   `json:"NodePort"`
	LogLevel             int      `json:"LogLevel"`
	IsTLS                bool     `json:"IsTLS"`
	CertPath             string   `json:"CertPath"`
	KeyPath              string   `json:"KeyPath"`
	CAPath               string   `json:"CAPath"`
	GenBlockTime         uint     `json:"GenBlockTime"`
	EncryptAlg           string   `json:"EncryptAlg"`
	MaxLogSize           int64    `json:"MaxLogSize"`
	MaxTxInBlock         int      `json:"MaxTransactionInBlock"`
	MaxHdrSyncReqs       int      `json:"MaxConcurrentSyncHeaderReqs"`
	ConsensusType        string   `json:"ConsensusType"`
	ChordPort            uint16   `json:"ChordPort"`
	GenesisBlockProposer string   `json:"GenesisBlockProposer"`
	Hostname             string   `json:"Hostname"`
}

func (*Configuration) IncrementPort

func (config *Configuration) IncrementPort()

Jump to

Keyboard shortcuts

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