Documentation ¶
Index ¶
- func CreateReverseProxy(target *url.URL) *httputil.ReverseProxy
- type Backend
- type BackendNode
- type Conf
- type Proxy
- func (p *Proxy) AdminAPI() *r2router.Seefor
- func (p *Proxy) ParseServerConfig(req *http.Request) (error, *ServerConfig)
- func (p *Proxy) Register(serverName, targetUrl string) error
- func (p *Proxy) RemoveServer(serverName string) error
- func (p *Proxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- func (p *Proxy) Start()
- func (p *Proxy) Unregister(serverName, targetUrl string) error
- type Server
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateReverseProxy ¶
func CreateReverseProxy(target *url.URL) *httputil.ReverseProxy
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
func NewBackend() *Backend
type BackendNode ¶
type BackendNode struct {
// contains filtered or unexported fields
}
type Conf ¶
type Conf struct { Host string Port int ApiEnable bool ApiHost string ApiPort int Servers []*ServerConfig }
func DefaultConf ¶
func DefaultConf() *Conf
func LoadConfig ¶
func ParseConfig ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) ParseServerConfig ¶
func (p *Proxy) ParseServerConfig(req *http.Request) (error, *ServerConfig)
func (*Proxy) RemoveServer ¶
func (*Proxy) Unregister ¶
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.