Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy struct contains the mux for handling paths, rp for conditionally doing a reverse proxy to upstream and root as root directory for serving static content.
func New ¶
New will return a Proxy struct with a new server mux and set reverse proxy Proxy.rp in case if the upstream is not empty.
func (*Proxy) Routes ¶
Routes will set routes based on the values of Proxy.rp and by default set / to file server.
Click to show internal directories.
Click to hide internal directories.