Documentation ¶
Index ¶
- Constants
- Variables
- func GetProxyServer(serverAddr string, transport http.RoundTripper, pathToExclude string) (*httputil.ReverseProxy, error)
- func NewDashboardHTTPReverseProxy(serverAddr string, transport http.RoundTripper) (func(writer http.ResponseWriter, request *http.Request), error)
- func NewHTTPReverseProxy(serverAddr string, transport http.RoundTripper, enforcer casbin.Enforcer) (func(writer http.ResponseWriter, request *http.Request), error)
- type Config
- type ProxyConnection
- type ProxyRouter
- type ProxyRouterImpl
Constants ¶
View Source
const Dashboard = "dashboard"
View Source
const Proxy = "proxy"
Variables ¶
View Source
var ProxyWireSet = wire.NewSet( GetProxyConfig, NewProxyRouterImpl, wire.Bind(new(ProxyRouter), new(*ProxyRouterImpl)), )
Functions ¶
func GetProxyServer ¶
func GetProxyServer(serverAddr string, transport http.RoundTripper, pathToExclude string) (*httputil.ReverseProxy, error)
func NewDashboardHTTPReverseProxy ¶
func NewDashboardHTTPReverseProxy(serverAddr string, transport http.RoundTripper) (func(writer http.ResponseWriter, request *http.Request), error)
func NewHTTPReverseProxy ¶
func NewHTTPReverseProxy(serverAddr string, transport http.RoundTripper, enforcer casbin.Enforcer) (func(writer http.ResponseWriter, request *http.Request), error)
Types ¶
type Config ¶
type Config struct {
ProxyServiceConfig string `env:"PROXY_SERVICE_CONFIG" envDefault:"{}"`
}
func GetProxyConfig ¶
type ProxyConnection ¶
type ProxyRouter ¶
type ProxyRouterImpl ¶
type ProxyRouterImpl struct {
// contains filtered or unexported fields
}
func NewProxyRouterImpl ¶
func NewProxyRouterImpl(logger *zap.SugaredLogger, proxyCfg *Config, enforcer casbin.Enforcer) (*ProxyRouterImpl, error)
func (ProxyRouterImpl) InitProxyRouter ¶
func (router ProxyRouterImpl) InitProxyRouter(ProxyRouter *mux.Router)
Click to show internal directories.
Click to hide internal directories.