Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.0.0
type Config struct { DataDir string LogLevel log.Level GracePeersShutdown time.Duration BootstrapTimeout time.Duration MaxMessageSize int DisableNatPort bool `mapstructure:"disable-natport"` Flood bool `mapstructure:"flood"` Listen string `mapstructure:"listen"` NetworkID uint32 `mapstructure:"network-id"` Bootnodes []string `mapstructure:"bootnodes"` TargetOutbound int `mapstructure:"target-outbound"` LowPeers int `mapstructure:"low-peers"` HighPeers int `mapstructure:"high-peers"` }
Config for all things related to p2p layer.
type Host ¶ added in v1.0.0
type Host struct { host.Host *pubsub.PubSub *bootstrap.Peers // contains filtered or unexported fields }
Host is a conveniency wrapper for all p2p related functionality required to run a full spacemesh node.
type Opt ¶ added in v1.0.0
type Opt func(fh *Host)
Opt is for configuring Host.
func WithContext ¶ added in v1.0.0
WithContext set context for Host.
func WithNodeReporter ¶ added in v1.0.0
func WithNodeReporter(reporter func()) Opt
WithNodeReporter updates reporter that is notified every time when node added or removed a peer.
Directories ¶
Path | Synopsis |
---|---|
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.