Documentation ¶
Index ¶
- func SetupInProcServer(t *testing.T) (*rpc.Server, *pandoraChainService)
- type DialRPCFn
- type Service
- func (s *Service) OnNewPendingHeader(ctx context.Context, header *eth1Types.Header) error
- func (s *Service) Start()
- func (s *Service) Status() error
- func (s *Service) Stop() error
- func (s *Service) SubscribePendingHeaders(ctx context.Context, crit *types.PandoraPendingHeaderFilter, namespace string, ...) (*rpc.ClientSubscription, error)
- func (s *Service) SubscribeToPendingWorkChannel(subscriberChan chan<- *types.HeaderHash) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DialRPCFn ¶
DialRPCFn dials to the given endpoint
func DialInProcClient ¶
DialInProcClient creates in process client for pandora mocked server
func DialRPCClient ¶
func DialRPCClient() DialRPCFn
DialRPCClient creates in process client for pandora rpc server
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service:
- maintains connection with pandora chain
- maintains db and cache to store the in-coming headers from pandora.
func NewService ¶
func NewService(ctx context.Context, endpoint string, namespace string, db db.PandoraHeaderHashDB, cache cache.PandoraHeaderCache, dialRPCFn DialRPCFn) (*Service, error)
NewService creates new service with pandora ws or ipc endpoint, pandora service namespace and db
func SetupPandoraSvc ¶
SetupPandoraSvc creates pandora chain service with mocked pandora chain interop
func (*Service) OnNewPendingHeader ¶
OnNewPendingHeader :
- cache and store header and header hash with status
- send to consensus service for checking header with vanguard header for confirmation
func (*Service) Start ¶
func (s *Service) Start()
Start a consensus info fetcher service's main event loop.
func (*Service) SubscribePendingHeaders ¶
func (s *Service) SubscribePendingHeaders( ctx context.Context, crit *types.PandoraPendingHeaderFilter, namespace string, client *rpc.Client, ) (*rpc.ClientSubscription, error)
subscribePendingHeaders subscribes to pandora client from latest saved slot using given rpc client
func (*Service) SubscribeToPendingWorkChannel ¶
func (s *Service) SubscribeToPendingWorkChannel(subscriberChan chan<- *types.HeaderHash) (err error)
Click to show internal directories.
Click to hide internal directories.