Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Proxy ¶
type Proxy struct { Addr string // TCP address to listen on, ":http" if empty Config *rpcserver.Config Client *lrpc.Client Logger log.Logger Listener net.Listener }
A Proxy defines parameters for running an HTTP server proxy.
func NewProxy ¶
func NewProxy( lightClient *light.Client, listenAddr, providerAddr string, config *rpcserver.Config, logger log.Logger, opts ...lrpc.Option, ) (*Proxy, error)
NewProxy creates the struct used to run an HTTP server for serving light client rpc requests.
func (*Proxy) ListenAndServe ¶
ListenAndServe configures the rpcserver.WebsocketManager, sets up the RPC routes to proxy via Client, and starts up an HTTP server on the TCP network address p.Addr. See http#Server#ListenAndServe.
func (*Proxy) ListenAndServeTLS ¶
ListenAndServeTLS acts identically to ListenAndServe, except that it expects HTTPS connections. See http#Server#ListenAndServeTLS.
Click to show internal directories.
Click to hide internal directories.