Documentation ¶
Index ¶
- type BeaconSlot
- type BeaconSlotRequest
- type BeaconSlotResponse
- type BeaconSlotsRequest
- type BeaconSlotsResponse
- type Handler
- func (h *Handler) V1BeaconSlot(ctx context.Context, req *BeaconSlotRequest) (*BeaconSlotResponse, error)
- func (h *Handler) V1BeaconSlots(ctx context.Context, req *BeaconSlotsRequest) (*BeaconSlotsResponse, error)
- func (h *Handler) V1Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error)
- type StatusRequest
- type StatusResponse
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconSlot ¶
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 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"` }
Click to show internal directories.
Click to hide internal directories.