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 ReverseProxy ¶
func ReverseProxy(ctx *Context) *httputil.ReverseProxy
NewReverseProxy Creat Reverse Proxy
Types ¶
type Context ¶
type Context struct { Writer http.ResponseWriter Req *http.Request // contains filtered or unexported fields }
type ProxyEngine ¶
type ProxyEngine struct { Cache *cache.Cache // contains filtered or unexported fields }
func New ¶
func New() *ProxyEngine
func (*ProxyEngine) Run ¶
func (e *ProxyEngine) Run(addr string) (err error)
func (*ProxyEngine) RunTLS ¶
func (e *ProxyEngine) RunTLS(addr, certFile, keyFile string) (err error)
func (*ProxyEngine) ServeHTTP ¶
func (e *ProxyEngine) ServeHTTP(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.