proxy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy interface {
	// Listen starts the proxy server. This call is assumed to be blocking
	Listen()

	// Stop stops the proxy server
	Stop()

	// GetAddr returns the connection's address. This is useful in the case one
	// use the default :0 port, which makes the system use a random free port.
	// The returned value can be nil if the server is not listening and the
	// connection hasn't been created.
	GetAddr() net.Addr

	// RegisterHandler registers a new handler
	RegisterHandler(path string, handler func(http.ResponseWriter, *http.Request))
}

Proxy defines the primitives to implement an http client that handles client side requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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