proxy

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Dashboard = "dashboard"
View Source
const Proxy = "proxy"

Variables

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

func GetProxyConfig() (*Config, error)

type ProxyConnection

type ProxyConnection struct {
	Host string `json:"host"`
	Port string `json:"port"`
}

type ProxyRouter

type ProxyRouter interface {
	InitProxyRouter(router *mux.Router)
}

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)

Jump to

Keyboard shortcuts

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