checkpointz

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconSlot

type BeaconSlot struct {
	Slot      phase0.Slot  `json:"slot"`
	BlockRoot string       `json:"block_root,omitempty"`
	StateRoot string       `json:"state_root,omitempty"`
	Epoch     phase0.Epoch `json:"epoch"`
	SlotTime  eth.SlotTime `json:"time"`
}

type BeaconSlotRequest

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

func NewBeaconSlotRequest

func NewBeaconSlotRequest(slot phase0.Slot) *BeaconSlotRequest

func (*BeaconSlotRequest) Validate

func (r *BeaconSlotRequest) Validate() error

type BeaconSlotResponse

type BeaconSlotResponse struct {
	Block    *spec.VersionedSignedBeaconBlock `json:"block"`
	Epoch    phase0.Epoch                     `json:"epoch"`
	SlotTime eth.SlotTime                     `json:"time"`
}

type BeaconSlotsRequest

type BeaconSlotsRequest struct {
}

func NewBeaconSlotsRequest

func NewBeaconSlotsRequest() *BeaconSlotsRequest

func (*BeaconSlotsRequest) Validate

func (r *BeaconSlotsRequest) Validate() error

type BeaconSlotsResponse

type BeaconSlotsResponse struct {
	Slots []BeaconSlot `json:"slots"`
}

type Handler

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

Handler is the Checkpointz API handler. HTTP-level concerns should NOT be contained in this package, they should be handled and reasoned with at a higher level.

func NewHandler

func NewHandler(log logrus.FieldLogger, beac beacon.FinalityProvider) *Handler

NewHandler returns a new Handler instance.

func (*Handler) V1BeaconSlot

func (h *Handler) V1BeaconSlot(ctx context.Context, req *BeaconSlotRequest) (*BeaconSlotResponse, error)

Slot returns the beacon slot for checkpointz.

func (*Handler) V1BeaconSlots

func (h *Handler) V1BeaconSlots(ctx context.Context, req *BeaconSlotsRequest) (*BeaconSlotsResponse, error)

Slot returns the beacon slot for checkpointz.

func (*Handler) V1Status

func (h *Handler) V1Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error)

Status returns the status for checkpointz.

type StatusRequest

type StatusRequest struct {
}

func NewStatusRequest

func NewStatusRequest() *StatusRequest

func (*StatusRequest) Validate

func (r *StatusRequest) Validate() error

type StatusResponse

type StatusResponse struct {
	Upstreams     map[string]*beacon.UpstreamStatus `json:"upstreams"`
	Finality      *v1.Finality                      `json:"finality"`
	PublicURL     string                            `json:"public_url,omitempty"`
	BrandName     string                            `json:"brand_name,omitempty"`
	BrandImageURL string                            `json:"brand_image_url,omitempty"`
	Version       Version                           `json:"version"`
	OperatingMode beacon.OperatingMode              `json:"operating_mode"`
}

type Version

type Version struct {
	Full      string `json:"full"`
	Short     string `json:"short"`
	Release   string `json:"release"`
	GitCommit string `json:"git_commit"`
}

Jump to

Keyboard shortcuts

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