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, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SSLNone defines to run http server only
	SSLNone sslMode = iota

	// SSLStatic defines to run both https and http server. Redirect http to https
	SSLStatic

	// SSLAuto defines to run both https and http server. Redirect http to https. Https server with autocert support
	SSLAuto
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Http

type Http struct {
	Matcher
	Address          string
	TimeOut          time.Duration
	AssetsLocation   string
	AssetsWebRoot    string
	MaxBodySize      int64
	GzEnabled        bool
	ProxyHeaders     []string
	SSLConfig        SSLConfig
	Version          string
	AccessLog        io.Writer
	DisableSignature bool
}

Http is a proxy server for both http and https

func (*Http) Run

func (h *Http) Run(ctx context.Context) error

Run the lister and request's router, activate rest server

type Matcher

type Matcher interface {
	Match(srv, src string) (string, bool)
	Servers() (servers []string)
	Mappers() (mappers []discovery.URLMapper)
}

Matcher source info (server and route) to the destination url If no match found return ok=false

type SSLConfig

type SSLConfig struct {
	SSLMode       sslMode
	Cert          string
	Key           string
	ACMELocation  string
	ACMEEmail     string
	FQDNs         []string
	RedirHTTPPort int
}

SSLConfig holds all ssl params for rest server

Jump to

Keyboard shortcuts

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