Documentation
¶
Overview ¶
File: internal/chain_poller_service/chain_poller_service.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainPollerService ¶
type ChainPollerService struct {
SubscriptionMgr *subscription_manager.SubscriptionManager
ChainPoller chain_poller.ChainPollerInterface
ChainID int64
LastBlock *big.Int
// contains filtered or unexported fields
}
ChainPollerService orchestrates the polling process and log broadcasting.
func NewChainPollerService ¶
func NewChainPollerService(cfg ChainPollerServiceConfig) (*ChainPollerService, error)
NewChainPollerService initializes a new ChainPollerService.
func (*ChainPollerService) Start ¶
func (eps *ChainPollerService) Start()
Start begins the polling loop.
func (*ChainPollerService) Stop ¶
func (eps *ChainPollerService) Stop()
Stop gracefully stops the polling loop.
func (*ChainPollerService) SubscriptionManager ¶
func (eps *ChainPollerService) SubscriptionManager() *subscription_manager.SubscriptionManager
type ChainPollerServiceConfig ¶
type ChainPollerServiceConfig struct {
PollInterval time.Duration
Logger *zerolog.Logger
BlockchainClient api.BlockchainClient
ChainID int64
}
ChainPollerServiceConfig holds the configuration for the ChainPollerService.
Click to show internal directories.
Click to hide internal directories.