core

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DebugMode indicates  mode is debug.
	DebugMode = "debug"
	// ReleaseMode indicates  mode is release.
	ReleaseMode = "release"
)
View Source
const EnvMode = "GATEWAY_MODE"

Variables

This section is empty.

Functions

func Mode

func Mode() string

func SetMode

func SetMode(value string)

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

type ProxyEngine

type ProxyEngine struct {
	// Director must be a function which modifies
	// the request into a new request to be sent
	// using Transport. Its response is then copied
	// back to the original client unmodified.
	Director func(*http.Request)

	// The transport used to perform proxy requests.
	Transport http.RoundTripper

	// FlushInterval specifies the flush interval
	// to flush to the client while copying the
	// response body.
	// If zero, no periodic flushing is done.
	FlushInterval time.Duration
	// contains filtered or unexported fields
}

func New

func New() *ProxyEngine

func (*ProxyEngine) Run

func (e *ProxyEngine) Run() error

type ReverseProxy

type ReverseProxy struct {
}

func NewReverseProxy

func NewReverseProxy() *ReverseProxy

Jump to

Keyboard shortcuts

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