reverseproxy

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 9 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 Interface

type Interface interface {
	Run(ctx context.Context, o Options) error
}

type Options added in v0.3.0

type Options struct {
	Transport http.RoundTripper
	Source    Source
	Target    Target
}

Options represents an option of a reverse proxy.

type ReverseProxy

type ReverseProxy struct {
	Logger logger.Interface
}

func (*ReverseProxy) Run added in v0.4.0

func (rp *ReverseProxy) Run(ctx context.Context, o Options) error

Run starts a server and waits until the context is canceled. In most case it returns an error which wraps context.Canceled.

type Source added in v0.3.0

type Source struct {
	AddressCandidates []string
}

Source represents a source of proxy.

type Target added in v0.3.0

type Target struct {
	Scheme string
	Host   string
	Port   int
}

Target represents a target of proxy.

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