Documentation ¶
Overview ¶
this module handles the peer to peer network
server-side:
* upstream sending of block, transactions * listener for RPC requests e.g. retrieve old block
client-side
* connector to retrieve missing data from other listeners
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchConnectors ¶ added in v0.3.30
func GetCounts ¶ added in v0.7.0
return connection counts:
incoming - total peers connectng to all listeners outgoing - total outgoing connections
func Initialise ¶
func Initialise(configuration *Configuration, version string) error
initialise peer backgrouds processes
Types ¶
type Configuration ¶ added in v0.2.0
type Configuration struct { DynamicConnections bool `libucl:"dynamic_connections" json:"dynamic_connections"` PreferIPv6 bool `libucl:"prefer_ipv6" json:"prefer_ipv6"` Listen []string `libucl:"listen" json:"listen"` Announce []string `libucl:"announce" json:"announce"` PrivateKey string `libucl:"private_key" json:"private_key"` PublicKey string `libucl:"public_key" json:"public_key"` Connect []Connection `libucl:"connect" json:"connect,omitempty"` }
a block of configuration data this is read from a libucl configuration file
type Connection ¶ added in v0.2.0
type Connection struct { PublicKey string `libucl:"public_key" json:"public_key"` Address string `libucl:"address" json:"address"` }
hardwired connections this is read from a libucl configuration file
type PublishConfiguration ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.