relay

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 17 Imported by: 5

Documentation

Overview

Package relay provides a reverse proxy which relays requests to your "vanilla" HTTP server, and supports crash recovery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *up.Config) (http.Handler, error)

New proxy.

We want to buffer the cleanup channel so that we can bound the number of concurrent processes executing, and prevent exhausting the ulimits of the host OS.

Types

type Proxy

type Proxy struct {

	// ReverseProxy is the reverse proxy making the requests to the app.
	*httputil.ReverseProxy
	// contains filtered or unexported fields
}

Proxy is a reverse proxy and sub-process monitor for ensuring your web server is running.

func (*Proxy) Restart

func (p *Proxy) Restart() error

Restart the server.

func (*Proxy) RoundTrip

func (p *Proxy) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implementation.

func (*Proxy) Start

func (p *Proxy) Start() error

Start the server.

Jump to

Keyboard shortcuts

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