Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClientVersion = "libp2p/0.0.1" MinClientVersion = "0.0.1" )
Variables ¶
View Source
var ( ConfigValues = DefaultConfig() TimeConfigValues = ConfigValues.TimeConfig SwarmConfigValues = ConfigValues.SwarmConfig )
ConfigValues specifies default values for node config params.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PrivateKey string `mapstructure:"private-key"` FastSync bool `mapstructure:"fast-sync"` TCPPort int `mapstructure:"tcp-port"` DialTimeout time.Duration `mapstructure:"dial-timeout"` ConnKeepAlive time.Duration `mapstructure:"conn-keepalive"` NetworkID uint32 `mapstructure:"network-id"` ResponseTimeout time.Duration `mapstructure:"response-timeout"` SwarmConfig SwarmConfig `mapstructure:"swarm"` TimeConfig TimeConfig }
Config defines the configuration options for the Spacemesh peer-to-peer networking layer
type SwarmConfig ¶
type SwarmConfig struct { Gossip bool `mapstructure:"gossip"` Bootstrap bool `mapstructure:"bootstrap"` RoutingTableBucketSize int `mapstructure:"bucketsize"` RoutingTableAlpha int `mapstructure:"alpha"` RandomConnections int `mapstructure:"randcon"` BootstrapNodes []string `mapstructure:"bootnodes"` }
SwarmConfig specifies swarm config params.
type TimeConfig ¶
type TimeConfig struct { MaxAllowedDrift time.Duration `mapstructure:"max-allowed-time-drift"` NtpQueries int `mapstructure:"ntp-queries"` DefaultTimeoutLatency time.Duration `mapstructure:"default-timeout-latency"` RefreshNtpInterval time.Duration `mapstructure:"ntp-refresh-interval"` }
TimeConfig specifies the timesync params for ntp.
Click to show internal directories.
Click to hide internal directories.