chain_poller_service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

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