routing

package
v0.0.0-...-324554c Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddServerToProxy

func AddServerToProxy(w http.ResponseWriter, r *http.Request)

AddServerToProxy adds a server to one of the routes of the proxy. It DOES NOT create a server. The already running server is added. (Checked by /healthCheck) Function writes a JSON response with a "hash" for the new server added. This is the route to which the proxy sends the requests to for this server. It checks for already existing ports on the proxy and rejects accordingly if a new server is requested on it.

func RemoveServerFromProxy

func RemoveServerFromProxy() error

RemoveServerFromProxy removes a server from the proxy and its route

func RouteForward

func RouteForward(w http.ResponseWriter, r *http.Request)

RouteForward forwards the request to the server and provides its response back to the client

func SetupRouting

func SetupRouting(r mux.Router) mux.Router

SetupRouting adds all the routes

Types

This section is empty.

Jump to

Keyboard shortcuts

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