Documentation
¶
Index ¶
- Constants
- Variables
- type ABTag
- type AbTest
- type CircuitBreaker
- type CityPrefix
- type Cluster
- type EDS
- type EDS_K8SKindId
- type EDS_Version
- type EDS_Version_Policy
- type Endpoint
- type Flow_Control_Policy
- type HTTPRoute
- type HealthCheck
- type HttpHealthCheck
- type K8sKind
- type LDS
- type LimitAction
- type LimitType
- type Listener
- type ListenerProtocol
- type OutlierDetection
- type Plugins
- type Ports
- type RateLimit
- type RouteMatchType
- type TimeOutPolicy
- type UnitType
Constants ¶
View Source
const ( LOCAL_REDIS_CHECK = 0 AUTH_SERVER_CHECK = 1 )
View Source
const ( Nil EDS_K8SKindId = iota ExtenDeploy = 1 CronJob = 2 EnvJob = 3 FrontDeploy = 4 Job = 5 Image = 0 )
View Source
const ( NONE = 0 BETA = 2 SIDECAR = 3 )
View Source
const ( A EDS_Version_Policy = iota B = 1 C = 2 )
Variables ¶
View Source
var Cities = []string{"sz", "sh", "wx", "cz", "ks"}
Functions ¶
This section is empty.
Types ¶
type CircuitBreaker ¶
type CityPrefix ¶
type CityPrefix int
const ( CityPrefixEnable CityPrefix = 0 CityPrefixDisable CityPrefix = 1 )
type EDS ¶
type EDS struct { Endpoints []*Endpoint Name string Version string ClusterIp string Ports []*Ports NetflowTagEnable int // -1 禁用 0 启用 EDSVersions []EDS_Version CircuitBreaker []*CircuitBreaker OutlierDetection OutlierDetection K8SKindId EDS_K8SKindId /** 是否开启 熔断 1-启用,0-禁用,参照枚举 TrueOrFalse */ EnableCircuitbreaker int /** 是否开启 异常点检测 1-启用,0-禁用,参照枚举 TrueOrFalse */ EnableOutlierDetection util.TrueOrFalse /** 是否开启 健康检查 1-启用,0-禁用,参照枚举 TrueOrFalse */ EnableHealthCheck util.TrueOrFalse /** 健康检查 */ HealthCheck HealthCheck GrayStrategy int }
func (*EDS) GetCdsVersion ¶
func (*EDS) GetEndpoint ¶
func (*EDS) GetPolicys ¶
func (eds *EDS) GetPolicys() []EDS_Version_Policy
func (*EDS) GetVersions ¶
type EDS_K8SKindId ¶
type EDS_K8SKindId int
type EDS_Version ¶
type EDS_Version struct { Version string Enable util.YesOrNo SelectPolicy Flow_Control_Policy FlowWeight int Policys []EDS_Version_Policy NetflowTag []string }
type EDS_Version_Policy ¶
type EDS_Version_Policy int
type Endpoint ¶
type Flow_Control_Policy ¶
type Flow_Control_Policy int
const ( Policy_Gray Flow_Control_Policy = iota Policy_Weight = 1 )
type HTTPRoute ¶
type HTTPRoute struct { Prefix string PrefixRewrite string HostRewrite bool ClusterName string //对应k8s中的service name Auth int GuId string Verify string Version string AbTest *AbTest RateLimits *RateLimit TimeOut int VerifyParam bool HashRoute bool HashRouteParams []string BindInternalUsers bool BindInternalUserTag string IsEnableAB bool //是否启用AB服务 ABTags []*ABTag //AB路由中的服务标签 IsEnableCanary bool //是否开启了灰度 CanaryTag *ABTag //灰度中的服务标签 Method string //OpenApi路由参数 IfNeedVerifySign bool //OpenApi是否需要验证签名 IfNeedEncryptContent bool //OpenApi是否需要加密发送数据 AuthServerVersion int //是否采用v2版本的认证 // 0 代表redis认证 1 代表 v2版本走auth server认证 IsCityTagPrefixEnable CityPrefix //是否带城市路由 /sz /ks /sh /wx 0 表示带城市表示 1 表示不带城市表示 }
type HealthCheck ¶
type HealthCheck struct { /** 每次健康检查扫描的间隔时间 */ Interval int64 /** http健康检查 */ HttpHealthCheck HttpHealthCheck }
type HttpHealthCheck ¶
type HttpHealthCheck struct { /** 路径 */ Path string }
type LDS ¶
type LDS struct { Name string RouteMatchType RouteMatchType Version string Plugins []*Plugins Listeners []*Listener EnableMirror bool }
func (*LDS) WithPlugin ¶
type LimitAction ¶
type ListenerProtocol ¶
type ListenerProtocol string
const ( LpTcp ListenerProtocol = "TCP" LpHttp ListenerProtocol = "HTTP" LpHttp2 ListenerProtocol = "HTTP2" )
func (ListenerProtocol) ToString ¶
func (lp ListenerProtocol) ToString() string
type OutlierDetection ¶
type OutlierDetection struct { Consecutive_5Xx uint32 Interval uint32 BaseEjectionTime uint32 MaxEjectionPercent uint32 EnforcingConsecutive_5Xx uint32 }
* 异常点检测
type Ports ¶
func (*Ports) GetProtocol ¶
func (ports *Ports) GetProtocol() ListenerProtocol
type RateLimit ¶
type RateLimit struct { IsEnable bool LimitActions []*LimitAction }
type RouteMatchType ¶
type RouteMatchType int
const ( Path RouteMatchType = 0 Prefix RouteMatchType = 1 Regex RouteMatchType = 2 )
type TimeOutPolicy ¶
type TimeOutPolicy struct {
IdleTimeOut int
}
Click to show internal directories.
Click to hide internal directories.