vulcan

package module
v0.0.0-...-68da624 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

README

Status

This library has been refactored into: https://github.com/mailgun/oxy and is being deprecated

OXY is compatible with HTTP standard library, provides the same features as Vulcan and is simpler to use. Please consider using it instead.

Vulcan library will stay there for a while in case if you are using it, but I would suggest consider migrating. Vulcand project is currently migrating to oxy library.

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
Circuit breakers start in the Standby state first, observing responses and watching location metrics.
Circuit breakers start in the Standby state first, observing responses and watching location metrics.
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
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
see http://godoc.org/github.com/mailgun/route for documentation on the language
see http://godoc.org/github.com/mailgun/route for documentation on the language
hostroute
Route the request by hostname
Route the request by hostname
pathroute
Route the request by path
Route the request by path
Package template consolidates various templating utilities used throughout different parts of vulcan.
Package template consolidates various templating utilities used throughout different parts of vulcan.
Package threshold contains predicates that can define various request thresholds Examples: * RequestMethod() == "GET" triggers action when request method equals "GET" * IsNetworkError() - triggers action on network errors * RequestMethod() == "GET" && Attempts <= 2 && (IsNetworkError() || ResponseCode() == 408) This predicate triggers for GET requests with maximum 2 attempts on network errors or when upstream returns special http response code 408
Package threshold contains predicates that can define various request thresholds Examples: * RequestMethod() == "GET" triggers action when request method equals "GET" * IsNetworkError() - triggers action on network errors * RequestMethod() == "GET" && Attempts <= 2 && (IsNetworkError() || ResponseCode() == 408) This predicate triggers for GET requests with maximum 2 attempts on network errors or when upstream returns special http response code 408

Jump to

Keyboard shortcuts

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