proxy

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2024 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RPCRoutes

func RPCRoutes(c *lrpc.Client) map[string]*rpcserver.RPCFunc

Types

type Proxy

type Proxy struct {
	Addr     string // TCP address to listen on, ":http" if empty
	Config   *rpcserver.Config
	Codec    *amino.Codec
	Client   *lrpc.Client
	Logger   log.Logger
	Listener net.Listener
}

A Proxy defines parameters for running an HTTP server proxy.

func (*Proxy) ListenAndServe

func (p *Proxy) ListenAndServe() error

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

func (p *Proxy) ListenAndServeTLS(certFile, keyFile string) error

ListenAndServeTLS acts identically to ListenAndServe, except that it expects HTTPS connections. See http#Server#ListenAndServeTLS.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL