Documentation ¶
Index ¶
- type Service
- func (s *Service) Start()
- func (s *Service) Status() error
- func (s *Service) Stop() error
- func (s *Service) SubscribeMinConsensusInfoEvent(ch chan<- *types.MinimalEpochConsensusInfoV2) event.Subscription
- func (s *Service) SubscribeShardInfoEvent(ch chan<- *types.VanguardShardInfo) event.Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service
- maintains connection with vanguard chain
- handles vanguard subscription for consensus info.
- sends new consensus info to all pandora subscribers.
- maintains consensusInfoDB to store the coming consensus info from vanguard.
func NewService ¶
NewService creates new service with vanguard endpoint, vanguard namespace and consensusInfoDB
func (*Service) Start ¶
func (s *Service) Start()
Start a consensus info fetcher service's main event loop.
func (*Service) SubscribeMinConsensusInfoEvent ¶
func (s *Service) SubscribeMinConsensusInfoEvent(ch chan<- *types.MinimalEpochConsensusInfoV2) event.Subscription
SubscribeMinConsensusInfoEvent registers a subscription of ChainHeadEvent.
func (*Service) SubscribeShardInfoEvent ¶
func (s *Service) SubscribeShardInfoEvent(ch chan<- *types.VanguardShardInfo) event.Subscription
Click to show internal directories.
Click to hide internal directories.