proxy

package
Version: v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2014 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package proxy contains a proxying HTTP transport.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

type Transport struct {
	// Proxy takes an http.Request and provides a URL to use for that request.
	// Note that the semantics are different from http.DefaultTransport: this
	// proxy is always invoked. If Proxy is nil, requests to the Transport are
	// unaltered.
	Proxy func(*http.Request) (*url.URL, error)

	// Next is the http.RoundTripper to which requests are forwarded.  If Next
	// is nil, http.DefaultTransport is used.
	Next http.RoundTripper
}

Transport is an implementation of the http.RoundTripper that uses a user supplied generator function to proxy requests to specific destinations.

func (Transport) RoundTrip

func (t Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

Source Files

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