observer

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0, MIT Imports: 25 Imported by: 0

Documentation

Overview

Package observer defines the event and message handing objects that are ultimately going to be used for metrics tracking. The observers should be fast and not connect to external data.

Package observer defines the event and message handing objects that are ultimately going to be used for metrics tracking. The observers should be fast and not connect to external data.

Index

Constants

View Source
const (
	ETH = "eth"
	POL = "pol"
)
View Source
const ReorgsKind = "reorgs"

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(o Observer, m Message) zerolog.Logger

Types

type AccountBalances

type AccountBalances map[common.Address]*TokenBalances

type AccountBalancesObserver

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

func (*AccountBalancesObserver) GetCollectors

func (o *AccountBalancesObserver) GetCollectors() []prometheus.Collector

func (*AccountBalancesObserver) Notify

func (o *AccountBalancesObserver) Notify(ctx context.Context, m Message)

func (*AccountBalancesObserver) Register

func (o *AccountBalancesObserver) Register(eb *EventBus)

type BaseFeePerGasObserver

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

func (*BaseFeePerGasObserver) GetCollectors

func (o *BaseFeePerGasObserver) GetCollectors() []prometheus.Collector

func (*BaseFeePerGasObserver) Notify

func (o *BaseFeePerGasObserver) Notify(ctx context.Context, m Message)

func (*BaseFeePerGasObserver) Register

func (o *BaseFeePerGasObserver) Register(eb *EventBus)

type BlockEventsObserver

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

func (*BlockEventsObserver) GetCollectors

func (o *BlockEventsObserver) GetCollectors() []prometheus.Collector

func (*BlockEventsObserver) Notify

func (o *BlockEventsObserver) Notify(ctx context.Context, m Message)

func (*BlockEventsObserver) Register

func (o *BlockEventsObserver) Register(eb *EventBus)

type BlockIntervalObserver

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

func (*BlockIntervalObserver) GetCollectors

func (o *BlockIntervalObserver) GetCollectors() []prometheus.Collector

func (*BlockIntervalObserver) Notify

func (o *BlockIntervalObserver) Notify(ctx context.Context, m Message)

func (*BlockIntervalObserver) Register

func (o *BlockIntervalObserver) Register(eb *EventBus)

type BlockObserver

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

func (*BlockObserver) GetCollectors

func (o *BlockObserver) GetCollectors() []prometheus.Collector

func (*BlockObserver) Notify

func (o *BlockObserver) Notify(ctx context.Context, m Message)

func (*BlockObserver) Register

func (o *BlockObserver) Register(eb *EventBus)

type BogonBlockObserver

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

func (*BogonBlockObserver) GetCollectors

func (o *BogonBlockObserver) GetCollectors() []prometheus.Collector

func (*BogonBlockObserver) Notify

func (o *BogonBlockObserver) Notify(ctx context.Context, m Message)

func (*BogonBlockObserver) Register

func (o *BogonBlockObserver) Register(eb *EventBus)

type BridgeEventNetworks

type BridgeEventNetworks struct {
	OriginNetwork      uint32
	DestinationNetwork uint32
}

type BridgeEventObserver

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

func (*BridgeEventObserver) GetCollectors

func (o *BridgeEventObserver) GetCollectors() []prometheus.Collector

func (*BridgeEventObserver) Notify

func (o *BridgeEventObserver) Notify(ctx context.Context, m Message)

func (*BridgeEventObserver) Register

func (o *BridgeEventObserver) Register(eb *EventBus)

type BridgeEventTimes

type BridgeEventTimes map[BridgeEventNetworks]time.Time

type CheckpointObserver

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

func (*CheckpointObserver) GetCollectors

func (o *CheckpointObserver) GetCollectors() []prometheus.Collector

func (*CheckpointObserver) Notify

func (o *CheckpointObserver) Notify(ctx context.Context, m Message)

func (*CheckpointObserver) Register

func (o *CheckpointObserver) Register(eb *EventBus)

type CheckpointSignatures

type CheckpointSignatures struct {
	Event     *contracts.RootChainNewHeaderBlock
	Block     *types.Block
	Signers   []common.Address
	Seen      bool
	Finalized bool
}

type ClaimEventObserver

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

func (*ClaimEventObserver) GetCollectors

func (o *ClaimEventObserver) GetCollectors() []prometheus.Collector

func (*ClaimEventObserver) Notify

func (o *ClaimEventObserver) Notify(ctx context.Context, m Message)

func (*ClaimEventObserver) Register

func (o *ClaimEventObserver) Register(eb *EventBus)

type ClaimEventTimes

type ClaimEventTimes map[uint32]time.Time

type CoreMessage

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

CoreMessage implements the shared functionality that will be common to all messages.

func NewMessage

func NewMessage(n network.Network, label string, data any) *CoreMessage

NewMessage will create a new core message type.

func (*CoreMessage) Data

func (cm *CoreMessage) Data() any

Data returns the generic data that was stored inside CoreMessage.

func (*CoreMessage) Network

func (cm *CoreMessage) Network() network.Network

Network returns the network that this particular message relates to.

func (*CoreMessage) Provider

func (cm *CoreMessage) Provider() string

Provider returns the label for the provider.

func (*CoreMessage) Time

func (cm *CoreMessage) Time() time.Time

Time returns the time that the message was created.

type DatastoreReorg

type DatastoreReorg struct {
	Depth      int
	Start      int
	End        int
	StartBlock *datastore.Key
	EndBlock   *datastore.Key
	Time       *time.Time
}

type DepositCountObserver

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

func (*DepositCountObserver) GetCollectors

func (o *DepositCountObserver) GetCollectors() []prometheus.Collector

func (*DepositCountObserver) Notify

func (o *DepositCountObserver) Notify(ctx context.Context, m Message)

func (*DepositCountObserver) Register

func (o *DepositCountObserver) Register(eb *EventBus)

type DepositCounts

type DepositCounts struct {
	DepositCount            *big.Int
	LastUpdatedDepositCount *uint32
}

type DoubleSignObserver

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

func (*DoubleSignObserver) GetCollectors

func (o *DoubleSignObserver) GetCollectors() []prometheus.Collector

func (*DoubleSignObserver) Notify

func (o *DoubleSignObserver) Notify(ctx context.Context, msg Message)

func (*DoubleSignObserver) Register

func (o *DoubleSignObserver) Register(eb *EventBus)

type EmptyBlockObserver

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

func (*EmptyBlockObserver) GetCollectors

func (o *EmptyBlockObserver) GetCollectors() []prometheus.Collector

func (*EmptyBlockObserver) Notify

func (o *EmptyBlockObserver) Notify(ctx context.Context, m Message)

func (*EmptyBlockObserver) Register

func (o *EmptyBlockObserver) Register(eb *EventBus)

type EventBus

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

EventBus is the object that will be responsible for passing messages between providers and observers.

func NewEventBus

func NewEventBus() *EventBus

NewEventBus is convenience constructor for the EventBus.

func (*EventBus) Jobs

func (eb *EventBus) Jobs() int

func (*EventBus) Publish

func (eb *EventBus) Publish(ctx context.Context, topic Topic, m Message)

Publish is called but the providers when they want to send a message to all subscribers.

func (*EventBus) Subscribe

func (eb *EventBus) Subscribe(topic Topic, o Observer)

Subscribe will configure the given observer to be notified whenever the given topic is published. It's up to the observer to filter and handle the variety of topics that could be created.

type ExchangeRate

type ExchangeRate struct {
	Base  string
	Quote string
	Rate  float64
}

type ExchangeRatesObserver

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

func (*ExchangeRatesObserver) GetCollectors

func (o *ExchangeRatesObserver) GetCollectors() []prometheus.Collector

func (*ExchangeRatesObserver) Notify

func (o *ExchangeRatesObserver) Notify(ctx context.Context, m Message)

func (*ExchangeRatesObserver) Register

func (o *ExchangeRatesObserver) Register(eb *EventBus)

type ExitRoot

type ExitRoot struct {
	Hash common.Hash
	Time time.Time
	Seen bool
}

type ExitRoots

type ExitRoots struct {
	GlobalExitRoot  *ExitRoot
	MainnetExitRoot *ExitRoot
	RollupExitRoot  *ExitRoot
}

type ExitRootsObserver

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

func (*ExitRootsObserver) GetCollectors

func (o *ExitRootsObserver) GetCollectors() []prometheus.Collector

func (*ExitRootsObserver) Notify

func (o *ExitRootsObserver) Notify(ctx context.Context, m Message)

func (*ExitRootsObserver) Register

func (o *ExitRootsObserver) Register(eb *EventBus)

type FailedProposerInfo

type FailedProposerInfo struct {
	FailedProposers []string
}

type GasLimitObserver

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

func (*GasLimitObserver) GetCollectors

func (o *GasLimitObserver) GetCollectors() []prometheus.Collector

func (*GasLimitObserver) Notify

func (o *GasLimitObserver) Notify(ctx context.Context, m Message)

func (*GasLimitObserver) Register

func (o *GasLimitObserver) Register(eb *EventBus)

type GasUsedObserver

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

func (*GasUsedObserver) GetCollectors

func (o *GasUsedObserver) GetCollectors() []prometheus.Collector

func (*GasUsedObserver) Notify

func (o *GasUsedObserver) Notify(ctx context.Context, m Message)

func (*GasUsedObserver) Register

func (o *GasUsedObserver) Register(eb *EventBus)

type HashDivergence

type HashDivergence struct {
	Blocks      []*types.Block
	BlockNumber uint64
}

type HashDivergenceObserver

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

func (*HashDivergenceObserver) GetCollectors

func (o *HashDivergenceObserver) GetCollectors() []prometheus.Collector

func (*HashDivergenceObserver) Notify

func (o *HashDivergenceObserver) Notify(ctx context.Context, m Message)

func (*HashDivergenceObserver) Register

func (o *HashDivergenceObserver) Register(eb *EventBus)

type HeimdallBlock

type HeimdallBlock struct {
	Result struct {
		Block struct {
			Header struct {
				Time            string `json:"time"`
				Height          string `json:"height"`
				NumTxs          string `json:"num_txs"`
				TotalTxs        string `json:"total_txs"`
				ProposerAddress string `json:"proposer_address"`
			} `json:"header"`
			LastCommit struct {
				PreCommits []*PreCommit `json:"precommits"`
			} `json:"last_commit"`
		} `json:"block"`
	} `json:"result"`
}

func (*HeimdallBlock) NumTxs

func (b *HeimdallBlock) NumTxs() (*big.Int, error)

func (*HeimdallBlock) Number

func (b *HeimdallBlock) Number() *big.Int

Number returns the Heimdall block number or nil if it doesn't exist.

func (*HeimdallBlock) PreCommits

func (b *HeimdallBlock) PreCommits() []*PreCommit

func (*HeimdallBlock) ProposerAddress

func (b *HeimdallBlock) ProposerAddress() string

func (*HeimdallBlock) Time

func (b *HeimdallBlock) Time() (uint64, error)

func (*HeimdallBlock) TotalTxs

func (b *HeimdallBlock) TotalTxs() (*big.Int, error)

type HeimdallBlockIntervalObserver

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

func (*HeimdallBlockIntervalObserver) GetCollectors

func (o *HeimdallBlockIntervalObserver) GetCollectors() []prometheus.Collector

func (*HeimdallBlockIntervalObserver) Notify

func (*HeimdallBlockIntervalObserver) Register

func (o *HeimdallBlockIntervalObserver) Register(eb *EventBus)

type HeimdallCheckpoint

type HeimdallCheckpoint struct {
	Height string `json:"height"`
	Result struct {
		HeimdallCheckpointBuffer
		ID uint64 `json:"id"`
	} `json:"result"`
}

type HeimdallCheckpointBuffer

type HeimdallCheckpointBuffer struct {
	Proposer   string `json:"proposer"`
	StartBlock uint64 `json:"start_block"`
	EndBlock   uint64 `json:"end_block"`
	RootHash   string `json:"root_hash"`
	BorChainID string `json:"bor_chain_id"`
	Timestamp  uint64 `json:"timestamp"`
}

type HeimdallCheckpointObserver

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

func (*HeimdallCheckpointObserver) GetCollectors

func (o *HeimdallCheckpointObserver) GetCollectors() []prometheus.Collector

func (*HeimdallCheckpointObserver) Notify

func (*HeimdallCheckpointObserver) Register

func (o *HeimdallCheckpointObserver) Register(eb *EventBus)

type HeimdallCurrentProposer

type HeimdallCurrentProposer struct {
	Height string `json:"height"`
	Result struct {
		api.Validator
	} `json:"result"`
}

type HeimdallHeightObserver

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

func (*HeimdallHeightObserver) GetCollectors

func (o *HeimdallHeightObserver) GetCollectors() []prometheus.Collector

func (*HeimdallHeightObserver) Notify

func (o *HeimdallHeightObserver) Notify(ctx context.Context, m Message)

func (*HeimdallHeightObserver) Register

func (o *HeimdallHeightObserver) Register(eb *EventBus)

type HeimdallMilestone

type HeimdallMilestone struct {
	Height string `json:"height"`
	Result struct {
		Proposer    string `json:"proposer"`
		StartBlock  uint64 `json:"start_block"`
		EndBlock    uint64 `json:"end_block"`
		Hash        string `json:"hash"`
		BorChainID  string `json:"bor_chain_id"`
		MilestoneID string `json:"milestone_id"`
		Timestamp   uint64 `json:"timestamp"`
	} `json:"result"`
	Count uint64 `json:"count"`
}

type HeimdallMilestoneCount

type HeimdallMilestoneCount struct {
	Height string `json:"height"`
	Result struct {
		Count uint64 `json:"count"`
	} `json:"result"`
}

type HeimdallMilestoneProposers

type HeimdallMilestoneProposers struct {
	Height string           `json:"height"`
	Result []*api.Validator `json:"result"`
}

type HeimdallMissedBlockProposal

type HeimdallMissedBlockProposal map[uint64]FailedProposerInfo

type HeimdallMissedBlockProposalObserver

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

func (*HeimdallMissedBlockProposalObserver) GetCollectors

func (*HeimdallMissedBlockProposalObserver) Notify

func (*HeimdallMissedBlockProposalObserver) Register

type HeimdallMissedCheckpointProposalObserver

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

func (*HeimdallMissedCheckpointProposalObserver) GetCollectors

func (*HeimdallMissedCheckpointProposalObserver) Notify

func (*HeimdallMissedCheckpointProposalObserver) Register

type HeimdallMissedMilestoneProposal

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

func (*HeimdallMissedMilestoneProposal) GetCollectors

func (*HeimdallMissedMilestoneProposal) Notify

func (*HeimdallMissedMilestoneProposal) Register

func (o *HeimdallMissedMilestoneProposal) Register(eb *EventBus)

type HeimdallSignatureCountObserver

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

func (*HeimdallSignatureCountObserver) GetCollectors

func (*HeimdallSignatureCountObserver) Notify

func (*HeimdallSignatureCountObserver) Register

func (o *HeimdallSignatureCountObserver) Register(eb *EventBus)

type HeimdallSpan

type HeimdallSpan struct {
	Height string `json:"height"`
	Result struct {
		SpanID     int64 `json:"span_id"`
		StartBlock int64 `json:"start_block"`
		EndBlock   int64 `json:"end_block"`
	} `json:"result"`
}

type HeimdallSpanObserver

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

func (*HeimdallSpanObserver) GetCollectors

func (o *HeimdallSpanObserver) GetCollectors() []prometheus.Collector

func (*HeimdallSpanObserver) Notify

func (o *HeimdallSpanObserver) Notify(ctx context.Context, m Message)

func (*HeimdallSpanObserver) Register

func (o *HeimdallSpanObserver) Register(eb *EventBus)

type HeimdallTotalTransactionCountObserver

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

func (*HeimdallTotalTransactionCountObserver) GetCollectors

func (*HeimdallTotalTransactionCountObserver) Notify

func (*HeimdallTotalTransactionCountObserver) Register

type HeimdallTransactionCountObserver

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

func (*HeimdallTransactionCountObserver) GetCollectors

func (*HeimdallTransactionCountObserver) Notify

func (*HeimdallTransactionCountObserver) Register

func (o *HeimdallTransactionCountObserver) Register(eb *EventBus)

type HeimdallValidator

type HeimdallValidator struct {
	Address          string `json:"address"`
	VotingPower      string `json:"voting_power"`
	ProposerPriority string `json:"proposer_priority"`
}

type HeimdallValidators

type HeimdallValidators struct {
	Result struct {
		BlockHeight string               `json:"block_height"`
		Validators  []*HeimdallValidator `json:"validators"`
	} `json:"result"`
}

func (*HeimdallValidators) Validators

func (b *HeimdallValidators) Validators() []*HeimdallValidator

type Message

type Message interface {
	Time() time.Time
	Network() network.Network
	Provider() string
	Data() any
}

Message is the basic abstraction that we'll use for pub/sub here. Every message should be specific to a network and for a given provider.

type MilestoneObserver

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

func (*MilestoneObserver) GetCollectors

func (o *MilestoneObserver) GetCollectors() []prometheus.Collector

func (*MilestoneObserver) Notify

func (o *MilestoneObserver) Notify(ctx context.Context, m Message)

func (*MilestoneObserver) Register

func (o *MilestoneObserver) Register(eb *EventBus)

type MissedBlockProposal

type MissedBlockProposal map[uint64][]string

type MissedBlockProposalObserver

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

func (*MissedBlockProposalObserver) GetCollectors

func (o *MissedBlockProposalObserver) GetCollectors() []prometheus.Collector

func (*MissedBlockProposalObserver) Notify

func (*MissedBlockProposalObserver) Register

func (o *MissedBlockProposalObserver) Register(eb *EventBus)

type Observer

type Observer interface {
	// Notify is called when a message is published.
	Notify(context.Context, Message)

	// Register allows the observer to substribe to whatever topics it cares about
	// and setup any metrics.
	Register(*EventBus)

	// GetCollectors will return a slice of the collectors that are
	// being tracked in this observer.
	GetCollectors() []prometheus.Collector
}

Observer defines the functioned required for adding a new observer. This (ideally) will be the most commonly implemented interface. Each metric be managed by an observer. An observer can manage multiple metrics. It's also worth noting that a single observer will be triggered by multiple providers so the observer needs to be aware of networks and providers.

type ObserverSet

type ObserverSet []Observer

ObserverSet is an abstraction for a collection of observers that is itself an observer.

func GetCompleteObserverSet

func GetCompleteObserverSet() ObserverSet

GetCompleteObserverSet collects all of the known observers for use in different packages.

func GetEnabledObserverSet

func GetEnabledObserverSet() ObserverSet

func (*ObserverSet) Notify

func (os *ObserverSet) Notify(ctx context.Context, msg Message)

Notify handles notifications for the observer set on the whole.

func (*ObserverSet) Register

func (os *ObserverSet) Register(eb *EventBus)

Register handled register methods for the observer set on the whole.

type PreCommit

type PreCommit struct {
	Type    uint64 `json:"type"`
	Height  string `json:"height"`
	Round   string `json:"round"`
	BlockId struct {
		Hash  string `json:"hash"`
		Parts struct {
			Total uint64 `json:"total"`
			Hash  string `json:"hash"`
		} `json:"parts"`
	} `json:"block_id"`
	Timestamp        string `json:"timestamp"`
	ValidatorAddress string `json:"validator_address"`
	ValidatorIndex   string `json:"validator_index"`
	Signature        string `json:"signature"`
	SideTxResults    []struct {
		TxHash string `json:"tx_hash"`
		Result uint64 `json:"result"`
		Sig    string `json:"sig"`
	} `json:"side_tx_results"`
}

type RefreshStateTimeObserver

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

func (*RefreshStateTimeObserver) GetCollectors

func (o *RefreshStateTimeObserver) GetCollectors() []prometheus.Collector

func (*RefreshStateTimeObserver) Notify

func (o *RefreshStateTimeObserver) Notify(ctx context.Context, m Message)

func (*RefreshStateTimeObserver) Register

func (o *RefreshStateTimeObserver) Register(eb *EventBus)

type ReorgObserver

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

func (*ReorgObserver) GetCollectors

func (o *ReorgObserver) GetCollectors() []prometheus.Collector

func (*ReorgObserver) Notify

func (o *ReorgObserver) Notify(ctx context.Context, m Message)

func (*ReorgObserver) Register

func (o *ReorgObserver) Register(eb *EventBus)

type RollupData

type RollupData struct {
	LastBatchSequenced          *uint64
	LastSequencedTimestamp      *uint64
	TimeBetweenSequencedBatches []uint64
	SequencedBatchesTxFees      []RollupTx

	LastForceBatch          *uint64
	LastForceBatchSequenced *uint64

	LastVerifiedBatch          *uint64
	LastVerifiedTimestamp      *uint64
	TimeBetweenVerifiedBatches []uint64
	VerifiedBatchesTxFees      []RollupTx

	TrustedSequencerBalances TokenBalances

	ChainID     *uint64
	Pessimistic bool
}

type RollupManager

type RollupManager struct {
	TotalSequencedBatches *uint64
	TotalVerifiedBatches  *uint64

	BatchFee       *big.Int
	ForcedBatchFee *big.Int
	RewardPerBatch *big.Int

	AggregatorBalances       map[common.Address]TokenBalances
	LastAggregationTimestamp *uint64

	Rollups         map[uint32]*RollupData
	RollupCount     *uint32
	RollupTypeCount *uint32
}

type RollupManagerObserver

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

func (*RollupManagerObserver) GetCollectors

func (o *RollupManagerObserver) GetCollectors() []prometheus.Collector

func (*RollupManagerObserver) Notify

func (o *RollupManagerObserver) Notify(ctx context.Context, m Message)

func (*RollupManagerObserver) Register

func (o *RollupManagerObserver) Register(eb *EventBus)

type RollupTx

type RollupTx struct {
	Fee     *big.Int
	Address common.Address
}

type SealedOutOfTurnObserver

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

func (*SealedOutOfTurnObserver) GetCollectors

func (o *SealedOutOfTurnObserver) GetCollectors() []prometheus.Collector

func (*SealedOutOfTurnObserver) Notify

func (o *SealedOutOfTurnObserver) Notify(ctx context.Context, msg Message)

func (*SealedOutOfTurnObserver) Register

func (o *SealedOutOfTurnObserver) Register(eb *EventBus)

type SensorBlockEvents

type SensorBlockEvents struct {
	Block  *database.DatastoreBlock
	Events []database.DatastoreEvent
}

type SensorBlocks

type SensorBlocks struct {
	Start  uint64
	End    uint64
	Blocks types.Blocks
}

type SensorBlocksObserver

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

func (*SensorBlocksObserver) GetCollectors

func (o *SensorBlocksObserver) GetCollectors() []prometheus.Collector

func (*SensorBlocksObserver) Notify

func (o *SensorBlocksObserver) Notify(ctx context.Context, msg Message)

func (*SensorBlocksObserver) Register

func (o *SensorBlocksObserver) Register(eb *EventBus)

type SensorBogonBlockObserver

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

func (*SensorBogonBlockObserver) GetCollectors

func (o *SensorBogonBlockObserver) GetCollectors() []prometheus.Collector

func (*SensorBogonBlockObserver) Notify

func (o *SensorBogonBlockObserver) Notify(ctx context.Context, m Message)

func (*SensorBogonBlockObserver) Register

func (o *SensorBogonBlockObserver) Register(eb *EventBus)

type StateSync

type StateSync struct {
	ID        uint64
	Time      time.Time // The time the state sync was first observed
	Finalized bool
}

type StateSyncObserver

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

func (*StateSyncObserver) GetCollectors

func (o *StateSyncObserver) GetCollectors() []prometheus.Collector

func (*StateSyncObserver) Notify

func (o *StateSyncObserver) Notify(ctx context.Context, m Message)

func (*StateSyncObserver) Register

func (o *StateSyncObserver) Register(eb *EventBus)

type StolenBlockObserver

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

func (*StolenBlockObserver) GetCollectors

func (o *StolenBlockObserver) GetCollectors() []prometheus.Collector

func (*StolenBlockObserver) Notify

func (o *StolenBlockObserver) Notify(ctx context.Context, msg Message)

func (*StolenBlockObserver) Register

func (o *StolenBlockObserver) Register(eb *EventBus)

type System

type System struct {
	StartTime    time.Time
	EventBusJobs int
}

type SystemObserver

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

func (*SystemObserver) GetCollectors

func (o *SystemObserver) GetCollectors() []prometheus.Collector

func (*SystemObserver) Notify

func (o *SystemObserver) Notify(ctx context.Context, m Message)

func (*SystemObserver) Register

func (o *SystemObserver) Register(eb *EventBus)

type TimeToFinalizedObserver

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

func (*TimeToFinalizedObserver) GetCollectors

func (o *TimeToFinalizedObserver) GetCollectors() []prometheus.Collector

func (*TimeToFinalizedObserver) Notify

func (o *TimeToFinalizedObserver) Notify(ctx context.Context, m Message)

func (*TimeToFinalizedObserver) Register

func (o *TimeToFinalizedObserver) Register(eb *EventBus)

type TimeToMine

type TimeToMine struct {
	Seconds        float64
	GasPrice       *big.Int
	GasPriceFactor int64
}

type TimeToMineObserver

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

func (*TimeToMineObserver) GetCollectors

func (o *TimeToMineObserver) GetCollectors() []prometheus.Collector

func (*TimeToMineObserver) Notify

func (o *TimeToMineObserver) Notify(ctx context.Context, m Message)

func (*TimeToMineObserver) Register

func (o *TimeToMineObserver) Register(eb *EventBus)

type TokenBalances

type TokenBalances struct {
	ETH *big.Int
	POL *big.Int
}

type Topic

type Topic interface {
	String() string
}

Topic is a basic abstraction for events that are going to be published or subscribed.

type TransactionCostObserver

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

func (*TransactionCostObserver) GetCollectors

func (o *TransactionCostObserver) GetCollectors() []prometheus.Collector

func (*TransactionCostObserver) Notify

func (o *TransactionCostObserver) Notify(ctx context.Context, m Message)

func (*TransactionCostObserver) Register

func (o *TransactionCostObserver) Register(eb *EventBus)

type TransactionCountObserver

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

func (*TransactionCountObserver) GetCollectors

func (o *TransactionCountObserver) GetCollectors() []prometheus.Collector

func (*TransactionCountObserver) Notify

func (o *TransactionCountObserver) Notify(ctx context.Context, m Message)

func (*TransactionCountObserver) Register

func (o *TransactionCountObserver) Register(eb *EventBus)

type TransactionGasFeeCapObserver

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

func (*TransactionGasFeeCapObserver) GetCollectors

func (o *TransactionGasFeeCapObserver) GetCollectors() []prometheus.Collector

func (*TransactionGasFeeCapObserver) Notify

func (*TransactionGasFeeCapObserver) Register

func (o *TransactionGasFeeCapObserver) Register(eb *EventBus)

type TransactionGasLimitObserver

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

func (*TransactionGasLimitObserver) GetCollectors

func (o *TransactionGasLimitObserver) GetCollectors() []prometheus.Collector

func (*TransactionGasLimitObserver) Notify

func (*TransactionGasLimitObserver) Register

func (o *TransactionGasLimitObserver) Register(eb *EventBus)

type TransactionGasPriceObserver

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

func (*TransactionGasPriceObserver) GetCollectors

func (o *TransactionGasPriceObserver) GetCollectors() []prometheus.Collector

func (*TransactionGasPriceObserver) Notify

func (*TransactionGasPriceObserver) Register

func (o *TransactionGasPriceObserver) Register(eb *EventBus)

type TransactionGasTipCapObserver

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

func (*TransactionGasTipCapObserver) GetCollectors

func (o *TransactionGasTipCapObserver) GetCollectors() []prometheus.Collector

func (*TransactionGasTipCapObserver) Notify

func (*TransactionGasTipCapObserver) Register

func (o *TransactionGasTipCapObserver) Register(eb *EventBus)

type TransactionPool

type TransactionPool struct {
	Pending uint64
	Queued  uint64
}

type TransactionPoolObserver

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

func (*TransactionPoolObserver) GetCollectors

func (o *TransactionPoolObserver) GetCollectors() []prometheus.Collector

func (*TransactionPoolObserver) Notify

func (o *TransactionPoolObserver) Notify(ctx context.Context, m Message)

func (*TransactionPoolObserver) Register

func (o *TransactionPoolObserver) Register(eb *EventBus)

type TransactionValueObserver

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

func (*TransactionValueObserver) GetCollectors

func (o *TransactionValueObserver) GetCollectors() []prometheus.Collector

func (*TransactionValueObserver) Notify

func (o *TransactionValueObserver) Notify(ctx context.Context, m Message)

func (*TransactionValueObserver) Register

func (o *TransactionValueObserver) Register(eb *EventBus)

type TrustedBatchObserver

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

func (*TrustedBatchObserver) GetCollectors

func (o *TrustedBatchObserver) GetCollectors() []prometheus.Collector

func (*TrustedBatchObserver) Notify

func (o *TrustedBatchObserver) Notify(ctx context.Context, m Message)

func (*TrustedBatchObserver) Register

func (o *TrustedBatchObserver) Register(eb *EventBus)

type UnclesObserver

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

func (*UnclesObserver) GetCollectors

func (o *UnclesObserver) GetCollectors() []prometheus.Collector

func (*UnclesObserver) Notify

func (o *UnclesObserver) Notify(ctx context.Context, m Message)

func (*UnclesObserver) Register

func (o *UnclesObserver) Register(eb *EventBus)

type ValidatorWalletBalanceObserver

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

func (*ValidatorWalletBalanceObserver) GetCollectors

func (*ValidatorWalletBalanceObserver) Notify

func (*ValidatorWalletBalanceObserver) Register

func (o *ValidatorWalletBalanceObserver) Register(eb *EventBus)

type ValidatorWalletBalances

type ValidatorWalletBalances map[string]*big.Int

type ZkEVMBatch

type ZkEVMBatch struct {
	Number uint64
	Time   time.Time
}

type ZkEVMBatchObserver

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

func (*ZkEVMBatchObserver) GetCollectors

func (o *ZkEVMBatchObserver) GetCollectors() []prometheus.Collector

func (*ZkEVMBatchObserver) Notify

func (o *ZkEVMBatchObserver) Notify(ctx context.Context, m Message)

func (*ZkEVMBatchObserver) Register

func (o *ZkEVMBatchObserver) Register(eb *EventBus)

type ZkEVMBatches

type ZkEVMBatches struct {
	TrustedBatch  ZkEVMBatch
	VirtualBatch  ZkEVMBatch
	VerifiedBatch ZkEVMBatch
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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