mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
212 lines
4.1 KiB
Go
212 lines
4.1 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Loadbalancer struct {
|
|
VirtualResource
|
|
ManagedResource
|
|
|
|
Address string
|
|
AddressType string
|
|
NetworkType string
|
|
NetworkId string
|
|
VpcId string
|
|
ZoneId string
|
|
|
|
BackendGroupId string
|
|
CloudregionId string
|
|
ChargeType string
|
|
LoadbalancerSpec string
|
|
}
|
|
|
|
type LoadbalancerTCPListener struct{}
|
|
type LoadbalancerUDPListener struct{}
|
|
|
|
type LoadbalancerHTTPListener struct {
|
|
StickySession string
|
|
StickySessionType string
|
|
StickySessionCookie string
|
|
StickySessionCookieTimeout int
|
|
|
|
XForwardedFor bool
|
|
Gzip bool
|
|
}
|
|
|
|
// CACertificate string
|
|
type LoadbalancerHTTPSListener struct {
|
|
CertificateId string
|
|
TLSCipherPolicy string
|
|
EnableHttp2 bool
|
|
}
|
|
|
|
type LoadbalancerHTTPRateLimiter struct {
|
|
HTTPRequestRate int
|
|
HTTPRequestRatePerSrc int
|
|
}
|
|
|
|
type LoadbalancerListener struct {
|
|
VirtualResource
|
|
ManagedResource
|
|
|
|
CloudregionId string
|
|
LoadbalancerId string
|
|
ListenerType string
|
|
ListenerPort int
|
|
|
|
Scheduler string
|
|
|
|
ClientRequestTimeout int
|
|
ClientIdleTimeout int
|
|
BackendConnectTimeout int
|
|
BackendIdleTimeout int
|
|
|
|
BackendGroupId string
|
|
BackendServerPort int
|
|
|
|
AclStatus string
|
|
AclType string
|
|
AclId string
|
|
|
|
HealthCheck string
|
|
HealthCheckType string
|
|
|
|
HealthCheckDomain string
|
|
HealthCheckURI string
|
|
HealthCheckHttpCode string
|
|
|
|
HealthCheckRise int
|
|
HealthCheckFall int
|
|
HealthCheckInterval int
|
|
HealthCheckTimeout int
|
|
|
|
HealthCheckReq string
|
|
HealthCheckExp string
|
|
|
|
LoadbalancerTCPListener
|
|
LoadbalancerUDPListener
|
|
LoadbalancerHTTPListener
|
|
LoadbalancerHTTPSListener
|
|
|
|
LoadbalancerHTTPRateLimiter
|
|
}
|
|
|
|
type LoadbalancerListenerRule struct {
|
|
VirtualResource
|
|
ManagedResource
|
|
|
|
CloudregionId string
|
|
ListenerId string
|
|
BackendGroupId string
|
|
|
|
Domain string
|
|
Path string
|
|
|
|
LoadbalancerHTTPRateLimiter
|
|
}
|
|
|
|
type LoadbalancerBackendGroup struct {
|
|
VirtualResource
|
|
ManagedResource
|
|
|
|
Type string
|
|
LoadbalancerId string
|
|
CloudregionId string
|
|
}
|
|
|
|
type LoadbalancerBackend struct {
|
|
VirtualResource
|
|
ManagedResource
|
|
|
|
CloudregionId string
|
|
BackendGroupId string
|
|
BackendId string
|
|
BackendType string
|
|
BackendRole string
|
|
Weight int
|
|
Address string
|
|
Port int
|
|
}
|
|
|
|
type LoadbalancerAclEntry struct {
|
|
Cidr string
|
|
Comment string
|
|
}
|
|
type LoadbalancerAclEntries []*LoadbalancerAclEntry
|
|
type LoadbalancerAcl struct {
|
|
SharableVirtualResource
|
|
ManagedResource
|
|
|
|
AclEntries *LoadbalancerAclEntries
|
|
CloudregionId string
|
|
}
|
|
|
|
type LoadbalancerCertificate struct {
|
|
VirtualResource
|
|
ManagedResource
|
|
|
|
Certificate string
|
|
PrivateKey string
|
|
|
|
CloudregionId string
|
|
PublicKeyAlgorithm string
|
|
PublicKeyBitLen int
|
|
SignatureAlgorithm string
|
|
Fingerprint string
|
|
NotBefore time.Time
|
|
NotAfter time.Time
|
|
CommonName string
|
|
SubjectAlternativeNames string
|
|
}
|
|
|
|
type LoadbalancerAgent struct {
|
|
StandaloneResource
|
|
|
|
HbLastSeen time.Time
|
|
HbTimeout int
|
|
|
|
Loadbalancers time.Time
|
|
LoadbalancerListeners time.Time
|
|
LoadbalancerListenerRules time.Time
|
|
LoadbalancerBackendGroups time.Time
|
|
LoadbalancerBackends time.Time
|
|
LoadbalancerAcls time.Time
|
|
LoadbalancerCertificates time.Time
|
|
Params LoadbalancerAgentParams
|
|
}
|
|
|
|
type LoadbalancerAgentParamsVrrp struct {
|
|
Priority int
|
|
VirtualRouterId int
|
|
GarpMasterRefresh int
|
|
Preempt bool
|
|
Interface string
|
|
AdvertInt int
|
|
Pass string
|
|
}
|
|
|
|
type LoadbalancerAgentParamsHaproxy struct {
|
|
GlobalLog string
|
|
GlobalNbthread int
|
|
LogHttp bool
|
|
LogTcp bool
|
|
LogNormal bool
|
|
}
|
|
|
|
type LoadbalancerAgentParamsTelegraf struct {
|
|
InfluxDbOutputUrl string
|
|
InfluxDbOutputName string
|
|
InfluxDbOutputUnsafeSsl bool
|
|
HaproxyInputInterval int
|
|
}
|
|
|
|
type LoadbalancerAgentParams struct {
|
|
KeepalivedConfTmpl string
|
|
HaproxyConfTmpl string
|
|
TelegrafConfTmpl string
|
|
Vrrp LoadbalancerAgentParamsVrrp
|
|
Haproxy LoadbalancerAgentParamsHaproxy
|
|
Telegraf LoadbalancerAgentParamsTelegraf
|
|
}
|