jvproxy

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

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

Go to latest
Published: Apr 1, 2016 License: GPL-3.0 Imports: 14 Imported by: 0

README

JvProxy
=======

An experimental caching web proxy.

Copyright (C) 2014, 2015  Jochen Voss

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Summary
-------

This is work in progress.  Currently the code is not very
configurable, it always starts a web proxy listening on
``localhost:8080``.  For use by the cache, the proxy creates a new
directory ``cache/`` inside the current directory.

REFERENCES
----------

- http://tools.ietf.org/html/rfc7234
- http://tools.ietf.org/html/rfc2616
- http://golang.org/src/pkg/net/http/httputil/reverseproxy.go?s=2534:2609#L87
- https://github.com/elazarl/goproxy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger() chan<- *LogEntry

Types

type LogEntry

type LogEntry struct {
	RequestTime time.Time
	RemoteAddr  string
	Method      string
	RequestURI  string

	StatusCode    int
	ContentLength int64
	Comments      []string

	ResponseReceivedNano int64
	HandlerCompleteNano  int64

	CacheResult string
}

type Proxy

type Proxy struct {
	Name string

	AdminMux *http.ServeMux
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(name string, transport http.RoundTripper, cache cache.Cache, shared bool) *Proxy

func (*Proxy) Close

func (proxy *Proxy) Close() error

func (*Proxy) ServeHTTP

func (proxy *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request)

Directories

Path Synopsis
pb
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
lib
Package lib contains a library of tests for HTTP caches.
Package lib contains a library of tests for HTTP caches.
test
Package test contains the infrastructure for a proxy tester.
Package test contains the infrastructure for a proxy tester.

Jump to

Keyboard shortcuts

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