Skip to content

eth::rpc::RpcEndpointPool

#include <rpc_manager.hpp>

Public Functions

Name
RpcEndpointPool() =default
RpcEndpointPool(std::vector< RpcEndpoint > endpoints)
const std::vector< RpcEndpoint > & endpoints() const
std::vector< RpcEndpoint > & endpoints()
std::optional< std::reference_wrapper< RpcEndpoint > > next_endpoint()
std::optional< std::reference_wrapper< const RpcEndpoint > > next_endpoint() const
void mark_temporary_failure(std::string_view url)
void disable(std::string_view url)
void reset_temporary_failures()

Public Attributes

Name
constexpr auto kMaxBackoff
constexpr auto kBaseBackoff
constexpr auto kEscalationWindow
constexpr uint32_t kEscalationThreshold

Public Functions Documentation

function RpcEndpointPool

RpcEndpointPool() =default

function RpcEndpointPool

explicit RpcEndpointPool(
    std::vector< RpcEndpoint > endpoints
)

function endpoints

inline const std::vector< RpcEndpoint > & endpoints() const

function endpoints

inline std::vector< RpcEndpoint > & endpoints()

function next_endpoint

std::optional< std::reference_wrapper< RpcEndpoint > > next_endpoint()

function next_endpoint

std::optional< std::reference_wrapper< const RpcEndpoint > > next_endpoint() const

function mark_temporary_failure

void mark_temporary_failure(
    std::string_view url
)

function disable

void disable(
    std::string_view url
)

function reset_temporary_failures

void reset_temporary_failures()

Public Attributes Documentation

variable kMaxBackoff

static constexpr auto kMaxBackoff = std::chrono::seconds(60);

variable kBaseBackoff

static constexpr auto kBaseBackoff = std::chrono::seconds(1);

variable kEscalationWindow

static constexpr auto kEscalationWindow = std::chrono::minutes(5);

variable kEscalationThreshold

static constexpr uint32_t kEscalationThreshold = 3;

Updated on 2026-08-14 at 19:28:58 +0000