Documentation ¶
Index ¶
- Constants
- func MarshalNamespaceConfig(cfg *Namespace) ([]byte, error)
- func MarshalProxyConfig(cfg *Proxy) ([]byte, error)
- type AdminServer
- type BackendNamespace
- type BreakerInfo
- type ConfigCenter
- type ConfigEtcd
- type ConfigFile
- type FrontendNamespace
- type FrontendUserInfo
- type Log
- type LogFile
- type Namespace
- type Performance
- type Proxy
- type ProxyServer
- type RateLimiterInfo
- type Registry
- type SQLInfo
- type StrategyInfo
Constants ¶
View Source
const (
DefaultClusterName = "default"
)
View Source
const (
MIN_SESSION_TIMEOUT = 600
)
Variables ¶
This section is empty.
Functions ¶
func MarshalNamespaceConfig ¶
func MarshalProxyConfig ¶
Types ¶
type AdminServer ¶
type BackendNamespace ¶
type BreakerInfo ¶
type BreakerInfo struct { Scope string `yaml:"scope"` Strategies []StrategyInfo `yaml:"strategies"` }
type ConfigCenter ¶
type ConfigCenter struct { Type string `yaml:"type"` ConfigFile ConfigFile `yaml:"config_file"` ConfigEtcd ConfigEtcd `yaml:"config_etcd"` }
type ConfigEtcd ¶
type ConfigFile ¶
type ConfigFile struct {
Path string `yaml:"path"`
}
type FrontendNamespace ¶
type FrontendNamespace struct { AllowedDBs []string `yaml:"allowed_dbs"` SlowSQLTime int `yaml:"slow_sql_time"` DeniedIPs []string `yaml:"denied_ips"` IdleTimeout int `yaml:"idle_timeout"` Users []FrontendUserInfo `yaml:"users"` SQLBlackList []SQLInfo `yaml:"sql_blacklist"` SQLWhiteList []SQLInfo `yaml:"sql_whitelist"` }
type FrontendUserInfo ¶
type Namespace ¶
type Namespace struct { Version string `yaml:"version"` Namespace string `yaml:"namespace"` Frontend FrontendNamespace `yaml:"frontend"` Backend BackendNamespace `yaml:"backend"` Breaker BreakerInfo `yaml:"breaker"` RateLimiter RateLimiterInfo `yaml:"rate_limiter"` }
type Performance ¶
type Performance struct {
TCPKeepAlive bool `yaml:"tcp_keep_alive"`
}
type Proxy ¶
type Proxy struct { Version string `yaml:"version"` Cluster string `yaml:"cluster"` ProxyServer ProxyServer `yaml:"proxy_server"` AdminServer AdminServer `yaml:"admin_server"` Log Log `yaml:"log"` Registry Registry `yaml:"registry"` ConfigCenter ConfigCenter `yaml:"config_center"` Performance Performance `yaml:"performance"` }
func UnmarshalProxyConfig ¶
type ProxyServer ¶
type RateLimiterInfo ¶
type StrategyInfo ¶
type StrategyInfo struct { MinQps int64 `yaml:"min_qps"` SqlTimeoutMs int64 `yaml:"sql_timeout_ms"` FailureRatethreshold int64 `yaml:"failure_rate_threshold"` FailureNum int64 `yaml:"failure_num"` OpenStatusDurationMs int64 `yaml:"open_status_duration_ms"` Size int64 `yaml:"size"` CellIntervalMs int64 `yaml:"cell_interval_ms"` }
Click to show internal directories.
Click to hide internal directories.