read

package
v0.12.0-preview.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaMonitoringStatuses added in v0.6.0

type MetaMonitoringStatuses struct {
	AssetPricesData             *int32
	BlockSignersData            *int32
	CometTxsData                *int32
	NetworkBalancesData         *int32
	NetworkHistorySegmentsData  *int32
	PrometheusEthereumCallsData *int32

	// Unused
	DataNodeData             *int32
	PrometheusEthNodeScanner *int32
	PrometheusNodeScanner    *int32
	PrometheusMetamonitoring *int32

	UpdateTime time.Time
}

type MetaMonitoringStatusesExtended added in v0.10.0

type MetaMonitoringStatusesExtended struct {
	HealthyOverAll              bool
	AssetPricesData             StatusDetails
	BlockSignersData            StatusDetails
	CometTxsData                StatusDetails
	NetworkBalancesData         StatusDetails
	NetworkHistorySegmentsData  StatusDetails
	PrometheusEthereumCallsData StatusDetails

	// Unused
	DataNodeData                 StatusDetails
	PrometheusEthNodeScannerData StatusDetails
	PrometheusNodeScannerData    StatusDetails
	PrometheusMetamonitoringData StatusDetails
}

func EmptyMetaMonitoringStatusesExtended added in v0.10.0

func EmptyMetaMonitoringStatusesExtended() *MetaMonitoringStatusesExtended

type ReadService

type ReadService struct {
	// contains filtered or unexported fields
}

func NewReadService

func NewReadService(
	coingeckoClient *coingecko.CoingeckoClient,
	cometClient *comet.CometClient,
	ethClient *ethutils.EthClient,
	storeReadService StoreReadService,
	log *logging.Logger,
) (*ReadService, error)

func (*ReadService) GetAssetPoolBalanceForToken

func (s *ReadService) GetAssetPoolBalanceForToken(tokenAddress, assetPoolAddress string) (*big.Int, error)

func (*ReadService) GetAssetPrices

func (s *ReadService) GetAssetPrices() ([]coingecko.PriceData, error)

func (*ReadService) GetBlockSigners

func (s *ReadService) GetBlockSigners(fromBlock int64, toBlock int64) ([]comet.BlockSignersData, error)

func (*ReadService) GetCometTxs

func (s *ReadService) GetCometTxs(fromBlock int64, toBlock int64) ([]comet.CometTx, error)

func (*ReadService) GetEarliestBlockHeight added in v0.9.0

func (s *ReadService) GetEarliestBlockHeight(ctx context.Context) (int64, error)

func (*ReadService) GetLatestFlushedSegmentsHeights added in v0.9.0

func (s *ReadService) GetLatestFlushedSegmentsHeights(ctx context.Context) (map[string]int64, error)

func (*ReadService) GetLatestLocalBlockHeight added in v0.9.0

func (s *ReadService) GetLatestLocalBlockHeight(ctx context.Context) (int64, error)

func (*ReadService) GetMetaMonitoringStatuses added in v0.6.0

func (s *ReadService) GetMetaMonitoringStatuses(ctx context.Context) (MetaMonitoringStatuses, error)

func (*ReadService) GetMetaMonitoringStatusesExtended added in v0.10.0

func (s *ReadService) GetMetaMonitoringStatusesExtended(ctx context.Context) (*MetaMonitoringStatusesExtended, error)

func (*ReadService) GetNetworkLatestBlockHeight

func (s *ReadService) GetNetworkLatestBlockHeight() (int64, error)

func (*ReadService) GetValidatorForAddressAtBlock

func (s *ReadService) GetValidatorForAddressAtBlock(address string, block int64) (*comet.ValidatorData, error)

type StatusDetails added in v0.10.0

type StatusDetails struct {
	Healthy         bool
	UpdatedAt       time.Time
	UnhealthyReason entities.UnhealthyReason
}

type StoreReadService

type StoreReadService interface {
	NewNetworkHistorySegment() *sqlstore.NetworkHistorySegment
	NewMonitoringStatus() *sqlstore.MonitoringStatus
}

Jump to

Keyboard shortcuts

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