epochextractor

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

type EpochExtractor added in v0.0.8

type EpochExtractor interface {
	SubscribeMinConsensusInfoEvent(chan<- *types.MinimalEpochConsensusInfo) event.Subscription
	CurrentEpoch() eth2Types.Epoch
	ConsensusInfoByEpochRange(fromEpoch, toEpoch eth2Types.Epoch) map[eth2Types.Epoch]*types.MinimalEpochConsensusInfo
}

type Service

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

func NewService

func NewService(ctx context.Context, pandoraHttpEndpoint string, vanguardHttpEndpoint string, genesisTime uint64) (*Service, error)

func (*Service) ConsensusInfoByEpochRange added in v0.0.8

func (s *Service) ConsensusInfoByEpochRange(
	fromEpoch,
	toEpoch types.Epoch,
) map[types.Epoch]*eventTypes.MinimalEpochConsensusInfo

ConsensusInfoByEpochRange

func (*Service) CurrentEpoch added in v0.0.8

func (s *Service) CurrentEpoch() types.Epoch

CurrentEpoch

func (*Service) Start

func (s *Service) Start()

Start a consensus info fetcher service's main event loop.

func (*Service) Status

func (s *Service) Status() error

func (*Service) Stop

func (s *Service) Stop() error

func (*Service) SubscribeMinConsensusInfoEvent added in v0.0.8

func (s *Service) SubscribeMinConsensusInfoEvent(ch chan<- *eventTypes.MinimalEpochConsensusInfo) event.Subscription

SubscribeChainHeadEvent registers a subscription of ChainHeadEvent.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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