iterator

package
v0.0.148 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLocationUpToDate = errors.New("location up to date")

	SlotZero = phase0.Slot(0)
)

Functions

func GetDefaultSlotLocation

func GetDefaultSlotLocation(forkEpochs state.ForkEpochs, cannonType xatu.CannonType) phase0.Slot

func NewSlotDefaultsFromForkEpochs

func NewSlotDefaultsFromForkEpochs(forkEpochs state.ForkEpochs) map[xatu.CannonType]phase0.Slot

Types

type BackfillingCheckpoint added in v0.0.136

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

func NewBackfillingCheckpoint added in v0.0.136

func NewBackfillingCheckpoint(log logrus.FieldLogger, networkName, networkID string, cannonType xatu.CannonType, coordinatorClient *coordinator.Client, wallclock *ethwallclock.EthereumBeaconChain, metrics *BackfillingCheckpointMetrics, beacon *ethereum.BeaconNode, checkpoint string) *BackfillingCheckpoint

func (*BackfillingCheckpoint) Next added in v0.0.136

func (c *BackfillingCheckpoint) Next(ctx context.Context) (next *xatu.CannonLocation, lookAhead []*xatu.CannonLocation, err error)

func (*BackfillingCheckpoint) UpdateLocation added in v0.0.136

func (c *BackfillingCheckpoint) UpdateLocation(ctx context.Context, location *xatu.CannonLocation) error

type BackfillingCheckpointMetrics added in v0.0.136

type BackfillingCheckpointMetrics struct {
	BackfillEpoch  *prometheus.GaugeVec
	FinalizedEpoch *prometheus.GaugeVec
}

func NewBackfillingCheckpointMetrics added in v0.0.136

func NewBackfillingCheckpointMetrics(namespace string) BackfillingCheckpointMetrics

func (*BackfillingCheckpointMetrics) SetBackfillEpoch added in v0.0.136

func (s *BackfillingCheckpointMetrics) SetBackfillEpoch(cannonType, network, checkpoint string, epoch float64)

func (*BackfillingCheckpointMetrics) SetFinalizedEpoch added in v0.0.136

func (s *BackfillingCheckpointMetrics) SetFinalizedEpoch(cannonType, network, checkpoint string, epoch float64)

type BlockprintIterator

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

func NewBlockprintIterator

func NewBlockprintIterator(log logrus.FieldLogger, networkName, networkID string, cannonType xatu.CannonType, coordinatorClient *coordinator.Client, metrics *BlockprintMetrics, client *blockprint.Client) *BlockprintIterator

func (*BlockprintIterator) Next

func (c *BlockprintIterator) Next(ctx context.Context) (next *xatu.CannonLocation, lookAhead []*xatu.CannonLocation, err error)

func (*BlockprintIterator) UpdateLocation

func (c *BlockprintIterator) UpdateLocation(ctx context.Context, location *xatu.CannonLocation) error

func (*BlockprintIterator) WithBlockprintClient

func (c *BlockprintIterator) WithBlockprintClient(client *blockprint.Client)

type BlockprintMetrics

type BlockprintMetrics struct {
	Targetslot  *prometheus.GaugeVec
	Currentslot *prometheus.GaugeVec
}

func NewBlockprintMetrics

func NewBlockprintMetrics(namespace string) BlockprintMetrics

func (*BlockprintMetrics) SetCurrentSlot

func (s *BlockprintMetrics) SetCurrentSlot(cannonType, network string, current float64)

func (*BlockprintMetrics) SetTargetSlot

func (s *BlockprintMetrics) SetTargetSlot(cannonType, network string, target float64)

type CheckpointIterator

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

func NewCheckpointIterator

func NewCheckpointIterator(log logrus.FieldLogger, networkName, networkID string, cannonType xatu.CannonType, coordinatorClient *coordinator.Client, wallclock *ethwallclock.EthereumBeaconChain, metrics *CheckpointMetrics, beacon *ethereum.BeaconNode, checkpoint string) *CheckpointIterator

func (*CheckpointIterator) Next

func (c *CheckpointIterator) Next(ctx context.Context) (next *xatu.CannonLocation, lookAhead []*xatu.CannonLocation, err error)

func (*CheckpointIterator) UpdateLocation

func (c *CheckpointIterator) UpdateLocation(ctx context.Context, location *xatu.CannonLocation) error

type CheckpointMetrics

type CheckpointMetrics struct {
	Trailingepochs *prometheus.GaugeVec
	Currentepoch   *prometheus.GaugeVec
}

func NewCheckpointMetrics

func NewCheckpointMetrics(namespace string) CheckpointMetrics

func (*CheckpointMetrics) SetCurrentEpoch

func (s *CheckpointMetrics) SetCurrentEpoch(cannonType, network, checkpoint string, current float64)

func (*CheckpointMetrics) SetTrailingEpochs

func (s *CheckpointMetrics) SetTrailingEpochs(cannonType, network, checkpoint string, trailing float64)

type Iterator

type Iterator interface {
	UpdateLocation(ctx context.Context, location *xatu.CannonLocation) error
	Next(ctx context.Context) (next *xatu.CannonLocation, lookAhead []*xatu.CannonLocation, err error)
}

type SlotMetrics

type SlotMetrics struct {
	TrailingSlots *prometheus.GaugeVec
	CurrentSlot   *prometheus.GaugeVec
}

func NewSlotMetrics

func NewSlotMetrics(namespace string) SlotMetrics

func (*SlotMetrics) SetCurrentSlot

func (s *SlotMetrics) SetCurrentSlot(cannonType, network string, currentSlot float64)

func (*SlotMetrics) SetTrailingSlots

func (s *SlotMetrics) SetTrailingSlots(cannonType, network string, trailingSlots float64)

Jump to

Keyboard shortcuts

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