rpc

package
v0.38.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(rpcConfig *config.RPCConfig, routes core.RoutesMap, logger log.Logger) http.Handler

Handler returns the http.Handler configured for use with an Inspector server. Handler registers the routes on the http.Handler and also registers the websocket handler and the CORS handler if specified by the configuration options.

func Routes

Routes returns the set of routes used by the Inspector server.

Types

type Server

type Server struct {
	Addr    string // TCP address to listen on, ":http" if empty
	Handler http.Handler
	Logger  log.Logger
	Config  *config.RPCConfig
}

Server defines parameters for running an Inspector rpc server.

func (*Server) ListenAndServe

func (srv *Server) ListenAndServe(ctx context.Context) error

ListenAndServe listens on the address specified in srv.Addr and handles any incoming requests over HTTP using the Inspector rpc handler specified on the server.

func (*Server) ListenAndServeTLS

func (srv *Server) ListenAndServeTLS(ctx context.Context, certFile, keyFile string) error

ListenAndServeTLS listens on the address specified in srv.Addr. ListenAndServeTLS handles incoming requests over HTTPS using the Inspector rpc handler specified on the server.

Jump to

Keyboard shortcuts

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