Documentation ¶
Overview ¶
Package peer - 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 BlockHeight ¶ added in v0.6.8
func BlockHeight() uint64
BlockHeight - return global block height
func FetchConnectors ¶ added in v0.3.30
FetchConnectors - obtain a list of all connector clients
func GetCounts ¶ added in v0.7.0
GetCounts - return connection counts:
incoming - total peers connectng to all listeners outgoing - total outgoing connections
func Initialise ¶
func Initialise(configuration *Configuration, version string, fastsync bool) error
Initialise - setup peer background processes
Types ¶
type Configuration ¶ added in v0.2.0
type Configuration struct { DynamicConnections bool `gluamapper:"dynamic_connections" json:"dynamic_connections"` PreferIPv6 bool `gluamapper:"prefer_ipv6" json:"prefer_ipv6"` Listen []string `gluamapper:"listen" json:"listen"` Announce []string `gluamapper:"announce" json:"announce"` PrivateKey string `gluamapper:"private_key" json:"private_key"` PublicKey string `gluamapper:"public_key" json:"public_key"` Connect []Connection `gluamapper:"connect" json:"connect,omitempty"` }
Configuration - a block of configuration data this is read from the configuration file
type Connection ¶ added in v0.2.0
type Connection struct { PublicKey string `gluamapper:"public_key" json:"public_key"` Address string `gluamapper:"address" json:"address"` }
Connection - hardwired connections this is read from the configuration file
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Package upstream - maintain REQ/REP connection to clients this allow for push of blocks, transactions...
|
Package upstream - maintain REQ/REP connection to clients this allow for push of blocks, transactions... |
Click to show internal directories.
Click to hide internal directories.