Documentation
¶
Index ¶
- Variables
- func IsRetryableError(err error) bool
- type Client
- func (c *Client) GetBids(ctx context.Context, params url.Values) ([]*mevrelay.BidTrace, error)
- func (c *Client) GetProposerPayloadDelivered(ctx context.Context, params url.Values) ([]*mevrelay.ProposerPayloadDelivered, error)
- func (c *Client) GetValidatorRegistrations(ctx context.Context, pubkey string) (*mevrelay.ValidatorRegistration, error)
- func (c *Client) Name() string
- func (c *Client) URL() string
- type Config
- type Metrics
- func (m *Metrics) IncAPIFailures(relay, endpoint, network string)
- func (m *Metrics) IncAPIRequests(relay, endpoint, network string)
- func (m *Metrics) IncBidsReceived(relay, network string, count int)
- func (m *Metrics) IncProposerPayloadDelivered(relay, network string, count int)
- func (m *Metrics) IncValidatorRegistrationsReceived(relay, network string, count int)
- func (m *Metrics) ObserveResponseTime(relay, endpoint, network string, duration float64)
- type RelayError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GetProposerPayloadEndpoint = "get_proposer_payload" GetValidatorRegistrationEndpoint = "get_validator_registration" )
API endpoint constants
View Source
var ( ErrValidatorNotRegistered = errors.New("validator not registered") ErrRateLimited = errors.New("rate limited") )
Sentinel errors for specific conditions.
View Source
var (
GetBidsEndpoint = "get_bids"
)
Functions ¶
func IsRetryableError ¶ added in v1.7.1
IsRetryableError checks if an error is retryable (either a retryable RelayError or a network error).
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetProposerPayloadDelivered ¶ added in v0.0.197
func (*Client) GetValidatorRegistrations ¶ added in v1.0.24
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func GetMetrics ¶
func (*Metrics) IncAPIFailures ¶
func (*Metrics) IncAPIRequests ¶
func (*Metrics) IncBidsReceived ¶
func (*Metrics) IncProposerPayloadDelivered ¶ added in v0.0.197
func (*Metrics) IncValidatorRegistrationsReceived ¶ added in v1.0.24
func (*Metrics) ObserveResponseTime ¶ added in v1.0.52
type RelayError ¶ added in v1.7.1
RelayError represents an error from the relay API with status code information.
func IsRelayError ¶ added in v1.7.1
func IsRelayError(err error) (*RelayError, bool)
IsRelayError checks if an error is a RelayError and returns it.
func NewRelayError ¶ added in v1.7.1
func NewRelayError(statusCode int, message, endpoint string) *RelayError
NewRelayError creates a new RelayError.
func (*RelayError) Error ¶ added in v1.7.1
func (e *RelayError) Error() string
func (*RelayError) IsClientError ¶ added in v1.7.1
func (e *RelayError) IsClientError() bool
IsClientError returns true if the error is a 4xx client error (excluding rate limiting).
func (*RelayError) IsRateLimited ¶ added in v1.7.1
func (e *RelayError) IsRateLimited() bool
IsRateLimited returns true if the error is due to rate limiting.
func (*RelayError) IsRetryable ¶ added in v1.7.1
func (e *RelayError) IsRetryable() bool
IsRetryable returns true if the error is likely transient and the request should be retried.
func (*RelayError) IsServerError ¶ added in v1.7.1
func (e *RelayError) IsServerError() bool
IsServerError returns true if the error is a 5xx server error.
Click to show internal directories.
Click to hide internal directories.