itc_boot

package
v1.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootNodeAPI

type BootNodeAPI interface {
	GetNodeBootTime() int64
	PeerID() peer.ID
	PeerConnectivity() (int, int, int)
	ListKnownPeers() peer.IDSlice
	ListConnectedPeers() []peer.ID
	ListPeer(topic string) []peer.ID
	ListTopic() []string
	ListBlockedPeer() []peer.ID
	GetConfig() rpc_common.Config
	ShutDown()
}

BootNodeAPI is the list of functions from node used to call rpc apis.

type BootService

type BootService struct {
	// Channel for shutting down the service
	ShutdownChan chan bool // Channel for shutting down the BootService
	// Boot node API
	BootNodeAPI BootNodeAPI
	// Shard ID
	ShardID uint32
}

BootService implements the BootService full node service.

func New

func New(nodeAPI BootNodeAPI) *BootService

New creates a new BootService object (including the initialisation of the common BootService object)

func (*BootService) GetNodeMetadata

func (itcboot *BootService) GetNodeMetadata() rpc_common.BootNodeMetadata

GetNodeMetadata returns the node metadata.

func (*BootService) GetPeerInfo

func (itcboot *BootService) GetPeerInfo() commonRPC.BootNodePeerInfo

GetPeerInfo returns the peer info to the node, including blocked peer, connected peer, number of peers

func (*BootService) ProtocolVersion

func (itcboot *BootService) ProtocolVersion() int

ProtocolVersion ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL