api

package
v0.3.18 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// proposer endpoints
	PathStatus            = "/eth/v1/builder/status"
	PathRegisterValidator = "/eth/v1/builder/validators"
	PathGetHeader         = "/eth/v1/builder/header/{slot:[0-9]+}/{parent_hash:0x[a-fA-F0-9]+}/{pubkey:0x[a-fA-F0-9]+}"
	PathGetPayload        = "/eth/v1/builder/blinded_blocks"

	// builder endpoints
	PathGetValidators = "/relay/v1/builder/validators"
	PathSubmitBlock   = "/relay/v1/builder/blocks"

	// data api
	PathBuilderBlocksReceived     = "/relay/v1/data/bidtraces/builder_blocks_received"
	PathProposerPayloadsDelivered = "/relay/v1/data/bidtraces/proposer_payload_delivered"
	PathSpecificRegistration      = "/relay/v1/data/validator_registration"
)

Router paths

View Source
const (
	DataLimit = 450
)

Variables

View Source
var (
	ErrParamNotFound = errors.New("not found")
)

Functions

func ParseHeaderRequest

func ParseHeaderRequest(r *http.Request) structs.HeaderRequest

Types

type API

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

func NewApi

func NewApi(l log.Logger, r Relay, reg Registrations) (a *API)

func (*API) AttachMetrics

func (api *API) AttachMetrics(m *metrics.Metrics)

func (*API) AttachToHandler

func (a *API) AttachToHandler(m *http.ServeMux)

type APIMetrics

type APIMetrics struct {
	ApiReqCounter *prometheus.CounterVec
	ApiReqTiming  *prometheus.HistogramVec
	ApiReqElCount *prometheus.HistogramVec

	RelayTiming *prometheus.HistogramVec
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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