{"repo":"yermakovsa/rcpx","free":true,"listed":false,"github":"https://github.com/yermakovsa/rcpx","clone":"git clone https://github.com/yermakovsa/rcpx.git","description":"Add priority-ordered failover to HTTP JSON-RPC clients in Go.","language":"Go","stars":14,"topics":["ethereum","failover","geth","go","go-ethereum","golang","http","http-transport","json-rpc","retry"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"rcpx rcpx is a small Go library that provides an HTTP JSON-RPC failover http.RoundTripper , mainly for Go applications using clients such as go-ethereum/rpc and ethclient . Configure an http.Client to use rcpx as its transport. For each request, rcpx tries upstream URLs in priority order until one succeeds, based on a retry policy and safety rails. Key behavior Tries upstreams sequentially, in priority order. Tries each eligible upstream at most once per request. By default, continues to the next upstream on any transport error, or on HTTP status 429 , 502 , 503 , 504 . By default, treats HTTP statuses other than 429 , 502 , 503 , 504 as success and returns them unchanged, even if non-2xx. Does not inspect JSON-RPC response bodies; HTTP 200 with a JSON-RPC error body is returned unchanged. If the request context is canceled or deadline exceeded, returns immediately and does not consult the retry policy. Buffers the request body once per request so it can resend it across upstreams, capped by BodyBufferBytes . Cooldown is enabled by default and can temporarily skip upstreams after consecutive failover-causing failures. By default, does not retry or fail over non-idempotent JSON-RPC methods such as eth sendRawTransaction and eth sendTransaction . API at a glance rcpx.NewRoundTripper(cfg rcpx.Config) (http.RoundTripper, error) When to use rcpx Use rcpx if you have multiple HTTP JSON-RPC endpoints and want in-process sequential failover, for example a primary RPC provider plus on","default_branch":null,"files":null,"tree":[],"storefront":"/r/yermakovsa","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yermakovsa/rcpx/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}