Documentation ¶
Index ¶
- func CertsChangeListen()
- func ConnectStore(endPoints []string, username, password string) error
- func DelDomainMetrics(domain *Domain)
- func DelDomainPathMetrics(domain *Domain, path *Path)
- func DomainKToBakDomainK(domainK string) string
- func GateWaySerName() string
- func GetCert(info *tls.ClientHelloInfo) (certificate *tls.Certificate, e error)
- func GetMetrics() metrics.Registry
- func GetReqListenMap() map[string][]*RequestListen
- func InitCerts()
- func PathKToBakPathK(dataK string) string
- func Proxy() *logrus.Logger
- func PutRequestCopy(requestCopy *RequestCopy) bool
- func RecordMetrics(serName string)
- func RequestListenRun()
- func SetSerName(name string)
- func Sys() *logrus.Logger
- func WatchDomains(e chan *clientv3.Event)
- func WatchPaths(e chan *clientv3.Event)
- type Cert
- type Domain
- type Metrics
- type Path
- type RecordsData
- type RequestCopy
- type RequestListen
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertsChangeListen ¶
func CertsChangeListen()
func ConnectStore ¶
func DelDomainMetrics ¶
func DelDomainMetrics(domain *Domain)
func DelDomainPathMetrics ¶
func GateWaySerName ¶
func GateWaySerName() string
func GetCert ¶
func GetCert(info *tls.ClientHelloInfo) (certificate *tls.Certificate, e error)
func GetMetrics ¶
func GetMetrics() metrics.Registry
func GetReqListenMap ¶
func GetReqListenMap() map[string][]*RequestListen
func PutRequestCopy ¶
func PutRequestCopy(requestCopy *RequestCopy) bool
func RequestListenRun ¶
func RequestListenRun()
func SetSerName ¶
func SetSerName(name string)
func WatchDomains ¶
func WatchPaths ¶
Types ¶
type Domain ¶
type Domain struct { Id string `json:"id"` DomainName string `json:"domain_name"` DomainUrl string `json:"domain_url"` LbType string `json:"lb_type"` Targets []*Target `json:"targets"` BlackIps map[string]bool `json:"black_ips"` RateLimiterNum float64 `json:"rate_limiter_num"` RateLimiterMsg string `json:"rate_limiter_msg"` RateLimiterEnabled bool `json:"rate_limiter_enabled"` Paths []*Path `json:"paths"` }
func DomainsData ¶
type Metrics ¶
type Metrics struct { Timer metrics.Timer Histograms metrics.Histogram }
func NewDomainMetrics ¶
func NewDomainPathMetrics ¶
type Path ¶
type Path struct { Id string `json:"id"` DomainId string `json:"domain_id"` ReqMethod string `json:"req_method"` ReqPath string `json:"req_path"` SearchPath string `json:"search_path"` ReplacePath string `json:"replace_path"` CircuitBreakerRequest int `json:"circuit_breaker_request"` CircuitBreakerPercent int `json:"circuit_breaker_percent"` CircuitBreakerTimeout int `json:"circuit_breaker_timeout"` CircuitBreakerMsg string `json:"circuit_breaker_msg"` CircuitBreakerEnabled bool `json:"circuit_breaker_enabled"` CircuitBreakerForce bool `json:"circuit_breaker_force"` PrivateProxyEnabled bool `json:"private_proxy_enabled"` LbType string `json:"lb_type"` Targets []*Target `json:"targets"` SetTime string `json:"set_time"` }
func DomainPathData ¶
type RecordsData ¶
type RequestCopy ¶
type RequestCopy struct { SerName string `json:"ser_name"` Id string `json:"id"` ReqTime string `json:"req_time"` ReqIp string `json:"req_ip"` ReqPath string `json:"req_path"` PostForm interface{} `json:"post_form"` Get string `json:"get"` ReqHeader interface{} `json:"req_header"` RspSize int `json:"rsp_size"` RspHeader http.Header `json:"rsp_header"` RspBody string `json:"rsp_body"` }
type RequestListen ¶
Click to show internal directories.
Click to hide internal directories.