Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) APIs() []rpc.API
- func (s *Service) DoService()
- func (s *Service) Init() error
- func (s *Service) NotifyService(params map[string]interface{})
- func (s *Service) Run()
- func (s *Service) SetMessageChan(messageChan chan *msg_pb.Message)
- func (s *Service) StartService()
- func (s *Service) StopService()
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// retry for 30s and give up then
ConnectionRetry = 15
)
ConnectionRetry set the number of retry of connection to bootnode in case the initial connection is failed
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { Host p2p.Host Rendezvous nodeconfig.GroupID // contains filtered or unexported fields }
Service is the network info service.
func MustNew ¶
func MustNew( h p2p.Host, rendezvous nodeconfig.GroupID, peerChan chan p2p.Peer, bootnodes p2putils.AddrList, dataStorePath string, ) *Service
MustNew is a panic-on-error version of New.
func New ¶
func New( h p2p.Host, rendezvous nodeconfig.GroupID, peerChan chan p2p.Peer, bootnodes p2putils.AddrList, dataStorePath string, ) (*Service, error)
New returns role conversion service. If dataStorePath is not empty, it points to a persistent database directory to use.
func (*Service) NotifyService ¶
NotifyService notify service
func (*Service) SetMessageChan ¶
SetMessageChan sets up message channel to service.
func (*Service) StartService ¶
func (s *Service) StartService()
StartService starts network info service.
func (*Service) StopService ¶
func (s *Service) StopService()
StopService stops network info service.
Click to show internal directories.
Click to hide internal directories.