Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateFakeForkChoice ¶
func GenerateFakeForkChoice() *v1.ForkChoice
Types ¶
type EventSource ¶
type EventSource string
const ( NilEventSource EventSource = "" UnknownEventSource EventSource = "unknown" BeaconNodeEventSource EventSource = "beacon_node" XatuPollingEventSource EventSource = "xatu_polling" XatuReorgEventEventSource EventSource = "xatu_reorg_event" )
func NewEventSourceFromString ¶
func NewEventSourceFromString(s string) EventSource
func RandomEventSource ¶
func RandomEventSource() EventSource
func (EventSource) String ¶
func (e EventSource) String() string
type Frame ¶
type Frame struct {
// Data is the fork choice dump.
Data *v1.ForkChoice `json:"data"`
// Metadata is the metadata of the frame.
Metadata FrameMetadata `json:"metadata"`
}
Frame holds a fork choice dump with a timestamp.
func GenerateFakeFrame ¶
func GenerateFakeFrame() *Frame
func (*Frame) AsGzipJSON ¶
func (*Frame) FromGzipJSON ¶
type FrameMetadata ¶
type FrameMetadata struct {
// ID is the ID of the frame.
ID string `json:"id"`
// Node is the node that provided the frame.
// In the case of a beacon node, this is the beacon node's ID as specified in the config for this service.
// In the case of Xatu, this is the Xatu Sentry ID.
Node string `json:"node"`
// FetchedAt is the time the frame was fetched.
FetchedAt time.Time `json:"fetched_at"`
// WallClockSlot is the wall clock slot at the time the frame was fetched.
WallClockSlot phase0.Slot `json:"wall_clock_slot"`
// WallClockSlot is the wall clock slot at the time the frame was fetched.
WallClockEpoch phase0.Epoch `json:"wall_clock_epoch"`
// Labels are labels to apply to the frame.
Labels []string `json:"labels"`
// ConsensusClient is the consensus client that provided the frame.
ConsensusClient string `json:"consensus_client"`
// EventSource is the event source that provided the frame.
EventSource string `json:"event_source"`
}
func (*FrameMetadata) Validate ¶
func (f *FrameMetadata) Validate() error
Click to show internal directories.
Click to hide internal directories.