reverseproxy

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package reverseproxy provides a reverse proxy.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Instance added in v1.1.0

type Instance interface {
	URL() *url.URL
	Shutdown(ctx context.Context) error
}

type Interface

type Interface interface {
	Run(o Option, readyChan chan<- Instance) error
}

type Option added in v1.1.0

type Option struct {
	Transport             http.RoundTripper
	BindAddressCandidates []string
	TargetScheme          string
	TargetHost            string
	TargetPort            int
}

Option represents an option of a reverse proxy.

type ReverseProxy

type ReverseProxy struct {
}

func (*ReverseProxy) Run added in v0.4.0

func (rp *ReverseProxy) Run(o Option, readyChan chan<- Instance) error

Run executes a reverse proxy server.

It returns nil if the server has been closed. It returns an error otherwise.

It will send the Instance to the readyChan when the reverse proxy is ready. Caller should close the readyChan.

Directories

Path Synopsis
Package mock_reverseproxy is a generated GoMock package.
Package mock_reverseproxy is a generated GoMock package.

Jump to

Keyboard shortcuts

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