Versions in this module Expand all Collapse all v0 v0.0.2 Oct 24, 2024 Changes in this version + var DasMethods = [...]string + type Balancer interface + NextServer func() *url.URL + type RPCRequest struct + ID any + JSONRPC string + Method string + Params interface{} + func (r *RPCRequest) IsDasRequest() bool + func (r *RPCRequest) RequestType() RPCRequestType + type RPCRequestType uint8 + const DasRPCRequest + const RegularRPCRequest + type RoundRobinBalancer struct + func NewRoundRobinBalancer(servers []ServerEndpoint) (*RoundRobinBalancer, error) + func (b *RoundRobinBalancer) NextServer() *url.URL + type Route struct + BalancerType string + Servers []ServerEndpoint + func (r Route) Balancer() (Balancer, error) + type RouterHandler struct + func NewRouter(regular Route, das Route) (*RouterHandler, error) + func (h *RouterHandler) NextServer(rpcReq *RPCRequest) *url.URL + func (h *RouterHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RpcRoutes map[RPCRequestType]Balancer + type ServerEndpoint struct + URL url.URL + Weight uint64 + func ConvertToEndpoint(rawUrl string, weight uint64) (ServerEndpoint, error) + func MustConvertToEndpoint(rawUrl string, weight uint64) ServerEndpoint + func (s *ServerEndpoint) UnmarshalJSON(data []byte) error + type WeightedRoundRobinBalancer struct + func NewWeightedRoundRobinBalancer(servers []ServerEndpoint) (*WeightedRoundRobinBalancer, error) + func (b *WeightedRoundRobinBalancer) NextServer() *url.URL v0.0.1 Aug 30, 2024