server

package
v0.0.0-...-80024de Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRequestAndRedirect

func HandleRequestAndRedirect(res http.ResponseWriter, req *http.Request)

HandleRequestAndRedirect given a request send it to the appropriate url

func LoadMap

func LoadMap(config config.Configuration)

LoadMap loads the configuration to an array of MethodRegExp

Types

type HandlerWrapper

type HandlerWrapper func(w http.ResponseWriter, r *http.Request)

HandlerWrapper type for the ServeHTTP function

func (*HandlerWrapper) ServeHTTP

func (h *HandlerWrapper) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MethodRegExp

type MethodRegExp struct {
	Name       string
	NameRegexp regexp.Regexp
	ProxyTo    []string
}

MethodRegExp type representing a JSON-RPC method with a compiled RegExp entity

func NewMethodRegExp

func NewMethodRegExp(name string, nameRegexp regexp.Regexp, proxyTo []string) MethodRegExp

NewMethodRegExp returns a new MethodRegExp instance

Jump to

Keyboard shortcuts

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