vulcan

package module
v0.0.0-...-a5469ec Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

README

Build Status Coverage Status

Reverse proxy library

Vulcan is a low level library that provides reverse proxy functionality to golang programs

Features

  • Load balancing
  • Request routing
  • Error detection and failure recovery
  • Connection and rate limiting
  • Pluggable middlewares

Status

  • Hardening and covering by tests, use at own risk

Documentation

Overview

This package contains the reverse proxy that implements http.HandlerFunc

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Takes a status code and formats it into proxy response
	ErrorFormatter errors.Formatter
}

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(router route.Router) (*Proxy, error)

Creates a proxy with a given router

func NewProxyWithOptions

func NewProxyWithOptions(router route.Router, o Options) (*Proxy, error)

Creates reverse proxy that acts like http request handler

func (*Proxy) GetRouter

func (p *Proxy) GetRouter() route.Router

func (*Proxy) ServeHTTP

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

Accepts requests, round trips it to the endpoint, and writes back the response.

Directories

Path Synopsis
Endpoints - final destination of the http request
Endpoints - final destination of the http request
Utility functions for producing errorneous http responses
Utility functions for producing errorneous http responses
Package failover contains predicates that define when request should be retried.
Package failover contains predicates that define when request should be retried.
Constants with common HTTP headers
Constants with common HTTP headers
Interfaces for request limiting
Interfaces for request limiting
connlimit
Simultaneous connection limiter
Simultaneous connection limiter
tokenbucket
Tokenbucket based request rate limiter
Tokenbucket based request rate limiter
Load balancers control how requests are distributed among multiple endpoints.
Load balancers control how requests are distributed among multiple endpoints.
roundrobin
Dynamic weighted round robin load balancer
Dynamic weighted round robin load balancer
Interfaces for location - round trip the http request to backends
Interfaces for location - round trip the http request to backends
httploc
HTTP location with load balancing and pluggable middlewares
HTTP location with load balancing and pluggable middlewares
In memory request performance metrics
In memory request performance metrics
Middlewares can modify or intercept requests and responses
Middlewares can modify or intercept requests and responses
Network related utilities
Network related utilities
Wrapper around http.Request with additional features
Wrapper around http.Request with additional features
Route the request to a location
Route the request to a location
exproute
Expression based request router, supports functions and combinations of functions in form <What to match><Matching verb> and || and && operators.
Expression based request router, supports functions and combinations of functions in form <What to match><Matching verb> and || and && operators.
hostroute
Route the request by hostname
Route the request by hostname
pathroute
Route the request by path
Route the request by path

Jump to

Keyboard shortcuts

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