Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CfgPeers defines the static peers this node should retain a connection to (CLI). CfgPeers = "peers" IdentityPrivateKeyFileName = "identity.key" )
Variables ¶
View Source
var ( ParamsP2P = &ParametersP2P{} ParamsPeers = &ParametersPeers{} )
View Source
var (
Component *app.Component
)
Functions ¶
This section is empty.
Types ¶
type ParametersP2P ¶
type ParametersP2P struct {
// BindAddress defines on which multi addresses the p2p service should listen on.
BindMultiAddresses []string `default:"/ip4/0.0.0.0/tcp/15600,/ip6/::/tcp/15600" usage:"the bind multi addresses for p2p connections"`
ConnectionManager struct {
// Defines the high watermark to use within the connection manager.
HighWatermark int `default:"10" usage:"the threshold up on which connections count truncates to the lower watermark"`
// Defines the low watermark to use within the connection manager.
LowWatermark int `default:"5" usage:"the minimum connections count to hold after the high watermark was reached"`
}
// ExternalMultiAddress defines additional p2p multiaddresses to be advertised via DHT.
ExternalMultiAddresses []string `default:"" usage:"external reacheable multi addresses advertised to the network"`
// Defines the private key used to derive the node identity (optional).
IdentityPrivateKey string `default:"" usage:"private key used to derive the node identity (optional)"`
Autopeering struct {
MaxPeers int `default:"5" usage:"the max number of autopeer connections. Set to 0 to disable autopeering."`
}
Database struct {
// Defines the path to the p2p database.
Path string `default:"testnet/p2pstore" usage:"the path to the p2p database"`
} `name:"db"`
}
ParametersP2P contains the definition of configuration parameters used by the p2p plugin.
type ParametersPeers ¶
type ParametersPeers struct {
// Defines the static peers this node should retain a connection to (CLI).
Peers []string `default:"" usage:"the static peers this node should retain a connection to (CLI)"`
// Defines the aliases of the static peers (must be the same length like CfgP2PPeers) (CLI).
PeerAliases []string `default:"" usage:"the aliases of the static peers (must be the same amount like \"p2p.peers\""`
// Defines the peers to be used as discovery for other peers (CLI).
BootstrapPeers []string `default:"" usage:"peers to be used as discovery for other peers (CLI)"`
}
ParametersPeers contains the definition of the parameters used by peers.
Click to show internal directories.
Click to hide internal directories.