Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBatchSize = 200
DefaultBatchSize is the default number of payloads to fetch per batch.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackfillIterator ¶
type BackfillIterator struct {
// contains filtered or unexported fields
}
func NewBackfillIterator ¶
func NewBackfillIterator( log logrus.FieldLogger, networkName, clientName string, relayMonitorType xatu.RelayMonitorType, relayName string, coordinatorClient *coordinator.Client, wallclock *ethwallclock.EthereumBeaconChain, toSlot phase0.Slot, checkInterval time.Duration, batchSize int, ) *BackfillIterator
func (*BackfillIterator) NextBatch ¶ added in v1.7.1
func (b *BackfillIterator) NextBatch(ctx context.Context) (*BatchRequest, error)
NextBatch returns batch parameters for fetching multiple payloads at once. This is more efficient than fetching slot-by-slot for backfilling. Returns nil if backfill is complete or no work available.
func (*BackfillIterator) UpdateLocation ¶
type BatchRequest ¶ added in v1.7.1
type BatchRequest struct {
// Params are the URL query parameters to pass to the relay API.
Params url.Values
// CurrentSlot is the current position of the iterator.
CurrentSlot uint64
// TargetSlot is the slot we're trying to reach.
TargetSlot uint64
// BatchSize is the number of payloads requested in this batch.
BatchSize int
}
BatchRequest contains parameters for a batch fetch request.
type ConsistencyMetrics ¶
type ConsistencyMetrics struct {
// Current slot being processed
CurrentSlot *prometheus.GaugeVec
// Lag (slots behind for forward fill, slots to go for backfill)
Lag *prometheus.GaugeVec
}
func NewConsistencyMetrics ¶
func NewConsistencyMetrics(namespace string) *ConsistencyMetrics
func (*ConsistencyMetrics) SetCurrentSlot ¶
func (m *ConsistencyMetrics) SetCurrentSlot(process, relay, eventType, network string, slot uint64)
func (*ConsistencyMetrics) SetLag ¶
func (m *ConsistencyMetrics) SetLag(process, relay, eventType, network string, lag int64)
type ForwardFillIterator ¶
type ForwardFillIterator struct {
// contains filtered or unexported fields
}
func NewForwardFillIterator ¶
func NewForwardFillIterator( log logrus.FieldLogger, networkName, clientName string, relayMonitorType xatu.RelayMonitorType, relayName string, coordinatorClient *coordinator.Client, wallclock *ethwallclock.EthereumBeaconChain, checkInterval time.Duration, trailDistance uint64, batchSize int, ) *ForwardFillIterator
func (*ForwardFillIterator) NextBatch ¶ added in v1.7.1
func (f *ForwardFillIterator) NextBatch(ctx context.Context) (*BatchRequest, error)
NextBatch returns batch parameters for fetching multiple payloads at once. This is more efficient than fetching slot-by-slot for catching up. Returns nil if already caught up or no work available.
func (*ForwardFillIterator) UpdateLocation ¶
Click to show internal directories.
Click to hide internal directories.