Documentation ¶
Index ¶
- Constants
- type BootNode
- func (bootnode *BootNode) APIs(intelchain *itc_boot.BootService) []rpc.API
- func (bootnode *BootNode) GetConfig() rpc_common.Config
- func (bootnode *BootNode) GetNodeBootTime() int64
- func (bootnode *BootNode) GetRPCServerConfig() *bootnodeConfigs.RPCServerConfig
- func (bootnode *BootNode) ListBlockedPeer() []peer.ID
- func (bootnode *BootNode) ListConnectedPeers() []peer.ID
- func (bootnode *BootNode) ListKnownPeers() peer.IDSlice
- func (bootnode *BootNode) ListPeer(topic string) []peer.ID
- func (bootnode *BootNode) ListTopic() []string
- func (bootnode *BootNode) PeerConnectivity() (int, int, int)
- func (bootnode *BootNode) PeerID() peer.ID
- func (bootnode *BootNode) RegisterService(st service.Type, s service.Service)
- func (bootnode *BootNode) ServiceManager() *service.Manager
- func (bootnode *BootNode) ShutDown()
- func (bootnode *BootNode) StartRPC() error
- func (bootnode *BootNode) StartServices() error
- func (bootnode *BootNode) StopRPC() error
- func (bootnode *BootNode) StopServices() error
Constants ¶
View Source
const ( // NumTryBroadCast is the number of times trying to broadcast NumTryBroadCast = 3 // MsgChanBuffer is the buffer of consensus message handlers. MsgChanBuffer = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootNode ¶
type BootNode struct { SelfPeer p2p.Peer // intelchain configurations IntelchainConfig *intelchainConfig.IntelchainConfig // node configuration, including group ID, shard ID, etc NodeConfig *nodeConfig.ConfigType // RPC configurations RPCConfig *bootnodeConfigs.RPCServerConfig // metrics Metrics metrics.Registry // contains filtered or unexported fields }
BootNode represents a protocol-participating node in the network
func New ¶
func New( host p2p.Host, hc *intelchainConfig.IntelchainConfig, ) *BootNode
New creates a new boot node.
func (*BootNode) APIs ¶
func (bootnode *BootNode) APIs(intelchain *itc_boot.BootService) []rpc.API
APIs return the collection of local RPC services. NOTE, some of these services probably need to be moved to somewhere else.
func (*BootNode) GetConfig ¶
func (bootnode *BootNode) GetConfig() rpc_common.Config
func (*BootNode) GetNodeBootTime ¶
GetNodeBootTime ..
func (*BootNode) GetRPCServerConfig ¶
func (bootnode *BootNode) GetRPCServerConfig() *bootnodeConfigs.RPCServerConfig
func (*BootNode) ListBlockedPeer ¶
ListBlockedPeer return list of blocked peers
func (*BootNode) ListConnectedPeers ¶
ListConnectedPeers return connected peers
func (*BootNode) ListKnownPeers ¶
ListKnownPeers return known peers
func (*BootNode) PeerConnectivity ¶
PeerConnectivity ..
func (*BootNode) RegisterService ¶
RegisterService register a service to the node service manager
func (*BootNode) ServiceManager ¶
ServiceManager ...
func (*BootNode) ShutDown ¶
func (bootnode *BootNode) ShutDown()
ShutDown gracefully shut down the node server and dump the in-memory blockchain state into DB.
func (*BootNode) StartServices ¶
StartServices runs registered services.
func (*BootNode) StopServices ¶
StopServices runs registered services.
Click to show internal directories.
Click to hide internal directories.