proxy

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package proxy provides a simple proxy for a CouchDB server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	*httputil.ReverseProxy
	// StrictMethods will reject any non-standard CouchDB methods immediately,
	// rather than relaying to the CouchDB server.
	StrictMethods bool
}

Proxy is an http.Handler which proxies connections to a CouchDB server.

func New

func New(serverURL string) (*Proxy, error)

New returns a new Proxy instance, which redirects all requests to the specified URL.

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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