Documentation
¶
Index ¶
- Constants
- func RegisterAPI(net *Network)
- type API
- type Network
- func (n *Network) Connected(network network.Network, c network.Conn)
- func (n *Network) Disconnected(_ network.Network, c network.Conn)
- func (n *Network) Listen(network.Network, multiaddr.Multiaddr)
- func (n *Network) ListenClose(network.Network, multiaddr.Multiaddr)
- func (n *Network) OnStart() error
- func (n *Network) OnStop()
- type Status
Constants ¶
View Source
const ( ProtocolID = "/doid/network/1" ProtocolGetBlocks = "/doid/block/get/1" ProtocolState = "/doid/state/1" TopicPeer = "/doid/topic/peer/1" TopicBlock = "/doid/topic/block/1" TopicTx = "/doid/topic/tx/1" )
View Source
const MaxBackupBootstrapSize = 20
Variables ¶
This section is empty.
Functions ¶
func RegisterAPI ¶
func RegisterAPI(net *Network)
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) Connections ¶ added in v0.0.4
func (*API) PeersInStore ¶
type Network ¶
type Network struct {
service.BaseService
// contains filtered or unexported fields
}
func NewNetwork ¶
func NewNetwork(chain *core.BlockChain, logger log.Logger) *Network
func (*Network) Disconnected ¶ added in v0.1.0
called when a connection closed
func (*Network) ListenClose ¶ added in v0.1.0
called when network stops listening on an addr
Click to show internal directories.
Click to hide internal directories.