Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAPI(net *Network)
- type API
- type Connections
- 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 MaxBackupBootstrapSize = 20
Variables ¶
View Source
var ProtocolID, ProtocolGetBlocks, ProtocolState, TopicPeer, TopicBlock, TopicTx string
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 *API) Connections() (c Connections)
func (*API) PeersInStore ¶
type Connections ¶ added in v0.2.0
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
type Status ¶
type Status struct { PeersInTopic peer.IDSlice `json:"peersInTopic"` Connections Connections `json:"connections"` }
Click to show internal directories.
Click to hide internal directories.