reverseproxy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 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 {
	Start(ctx context.Context, eg *errgroup.Group, o Options) (string, error)
}

type Options added in v0.3.0

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

Options represents an option of ReverseProxy.

type ReverseProxy

type ReverseProxy struct {
	Logger logger.Interface
}

ReverseProxy provides a reverse proxy.

func (*ReverseProxy) Start

func (rp *ReverseProxy) Start(ctx context.Context, eg *errgroup.Group, o Options) (string, error)

Start starts a reverse proxy in goroutines and returns the bound address.

type Source added in v0.3.0

type Source struct {
	Address string // local address to bind
}

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