go_gateway

package
Version: v0.0.0-...-b56afce Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2016 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(yamlReader io.Reader) error

Note: Register Dies for pipeline before calling ListenAndServe.

Example of YAML:

port: 8080 target: http://httpbin.org pipes: # pipe definitions

main:                     # pipe id
  request:                # request pipeline
  - dump:                 # name of plugin
      dumpBody: true      # plugin-specific configuration
  response:               # response pipeline
  - dump:                 # name of plugin
      dumpBody: true      # plugin-specific configuration

proxies: # maps host & path -> pipe

- host: localhost         # host
  path: /                 # path
  pipe: main              # pipe to use

Types

type ReverseProxyHandler

type ReverseProxyHandler struct {
	Definition pipeline.Definition
	Target     *url.URL
}

func (*ReverseProxyHandler) ServeHTTP

func (self *ReverseProxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL