vulcan: Index | Files | Directories

package vulcan

import ""

This package contains the reverse proxy that implements http.HandlerFunc


Package Files


type Options Uses

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

type Proxy Uses

type Proxy struct {
    // contains filtered or unexported fields

func NewProxy Uses

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

Creates a proxy with a given router

func NewProxyWithOptions Uses

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

Creates reverse proxy that acts like http request handler

func (*Proxy) GetRouter Uses

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

func (*Proxy) ServeHTTP Uses

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

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


circuitbreakerCircuit breakers start in the Standby state first, observing responses and watching location metrics.
endpointEndpoints - final destination of the http request
errorsUtility functions for producing errorneous http responses
headersConstants with common HTTP headers
limitInterfaces for request limiting
limit/connlimitSimultaneous connection limiter
limit/tokenbucketTokenbucket based request rate limiter
loadbalanceLoad balancers control how requests are distributed among multiple endpoints.
loadbalance/roundrobinDynamic weighted round robin load balancer
locationInterfaces for location - round trip the http request to backends
location/httplocHTTP location with load balancing and pluggable middlewares
metricsIn memory request performance metrics
middlewareMiddlewares can modify or intercept requests and responses
netutilsNetwork related utilities
requestWrapper around http.Request with additional features
routeRoute the request to a location
route/exproutesee for documentation on the language
route/hostrouteRoute the request by hostname
route/pathrouteRoute the request by path
templatePackage template consolidates various templating utilities used throughout different parts of vulcan.
thresholdPackage threshold contains predicates that can define various request thresholds

Package vulcan imports 9 packages (graph) and is imported by 2 packages. Updated 2018-02-24. Refresh now. Tools for package owners.