types

package
v0.0.31-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFakeForkChoice

func GenerateFakeForkChoice() *v1.ForkChoice

Types

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 (f *Frame) AsGzipJSON() ([]byte, error)

func (*Frame) FromGzipJSON

func (f *Frame) FromGzipJSON(data []byte) error

func (*Frame) Validate

func (f *Frame) Validate() error

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"`
}

func (*FrameMetadata) Validate

func (f *FrameMetadata) Validate() error

Jump to

Keyboard shortcuts

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