Documentation ¶
Index ¶
- Constants
- func AddMember(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (bool, error)
- func Delete(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (bool, error)
- func DeleteMember(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string, ...) error
- func List(restClient *client.RestClient, requestOpts *client.RequestOpts) (*[]LoadBalancerInfo, error)
- func MemberList(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (*[]LoadBalancerMember, error)
- func UpdateHealthChecker(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (bool, error)
- type AddMemberInfo
- type LoadBalancerAlgorithmType
- type LoadBalancerHealthCheckerUpdateInfo
- type LoadBalancerInfo
- func Create(restClient *client.RestClient, requestOpts *client.RequestOpts) (*LoadBalancerInfo, error)
- func Get(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (*LoadBalancerInfo, error)
- func GetByName(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbName string) (*LoadBalancerInfo, error)
- func GetSimple(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (*LoadBalancerInfo, error)
- func Update(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (*LoadBalancerInfo, error)
- type LoadBalancerMember
- type LoadBalancerReqInfo
- type LoadBalancerReqMember
- type LoadBalancerType
- type LoadBalancerUpdateInfo
Constants ¶
View Source
const ( LoadBalancerAlgorithmRoundRobin LoadBalancerAlgorithmType = "rr" LoadBalancerAlgorithmLeastConnection LoadBalancerAlgorithmType = "lc" LoadBalancerAlgorithmSourceHash LoadBalancerAlgorithmType = "sh" LoadBalancerExternalType LoadBalancerType = "EXTERNAL" LoadBalancerInternalType LoadBalancerType = "INTERNAL" )
Variables ¶
This section is empty.
Functions ¶
func AddMember ¶
func AddMember(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (bool, error)
func Delete ¶
func Delete(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (bool, error)
func DeleteMember ¶
func DeleteMember(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string, memberId string) error
func List ¶
func List(restClient *client.RestClient, requestOpts *client.RequestOpts) (*[]LoadBalancerInfo, error)
func MemberList ¶
func MemberList(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (*[]LoadBalancerMember, error)
func UpdateHealthChecker ¶
func UpdateHealthChecker(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (bool, error)
Types ¶
type AddMemberInfo ¶
type LoadBalancerAlgorithmType ¶
type LoadBalancerAlgorithmType string
type LoadBalancerHealthCheckerUpdateInfo ¶
type LoadBalancerHealthCheckerUpdateInfo struct { Scheduler string `json:"scheduler,omitempty"` ResponseTime int `json:"responseTime,omitempty"` IntervalTime int `json:"intervalTime,omitempty"` UnhealthyThreshold int `json:"unhealthyThreshold,omitempty"` HealthyThreshold int `json:"healthyThreshold,omitempty"` }
type LoadBalancerInfo ¶
type LoadBalancerInfo struct { Id string `json:"id"` TenantId string `json:"tenantId"` Name string `json:"name"` State string `json:"state"` Ip string `json:"ip"` Port int `json:"port"` Protocol string `json:"protocol"` HaCaId string `json:"haCaId"` Type string `json:"type"` Scheduler string `json:"scheduler"` Members []LoadBalancerMember `json:"members" required:"true"` MemberCount int `json:"memberCount"` Creator string `json:"creator"` Protection int `json:"protection"` MonitorType string `json:"monitorType"` // Health-Monitor ResponseTime int `json:"responseTime"` // Health-Monitor IntervalTime int `json:"intervalTime"` // Health-Monitor UnhealthyThreshold int `json:"unhealthyThreshold"` // Health-Monitor HealthyThreshold int `json:"healthyThreshold"` // Health-Monitor HttpUrl string `json:"httpUrl"` // Health-Monitor Description string `json:"description"` CreatedAt string `json:"createdAt"` Url string `json:"url"` Tlsv12Enabled int `json:"tlsv12Enabled"` MaxConn int `json:"maxConn"` StatsPort int `json:"statsPort"` }
func Create ¶
func Create(restClient *client.RestClient, requestOpts *client.RequestOpts) (*LoadBalancerInfo, error)
func Get ¶
func Get(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (*LoadBalancerInfo, error)
func GetByName ¶
func GetByName(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbName string) (*LoadBalancerInfo, error)
func GetSimple ¶
func GetSimple(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (*LoadBalancerInfo, error)
func Update ¶
func Update(restClient *client.RestClient, requestOpts *client.RequestOpts, nlbId string) (*LoadBalancerInfo, error)
type LoadBalancerMember ¶
type LoadBalancerMember struct { Id string `json:"id"` MemberIp string `json:"memberIp"` MemberPort string `json:"memberPort"` LbId string `json:"lbId"` Creator string `json:"creator"` Network string `json:"network"` ServerName string `json:"serverName"` State string `json:"state"` HealthState string `json:"healthState"` // Health-Monitor Template string `json:"template"` Spec string `json:"spec"` OsType string `json:"osType"` CpuNum int `json:"cpuNum"` MemSize int `json:"memSize"` VolumeSize int `json:"volumeSize"` HealthCheckSuccessCount int `json:"healthCheckSuccessCount"` HealthCheckFailCount int `json:"healthCheckFailCount"` HostName string `json:"hostName"` CreatedAt string `json:"createdAt"` }
type LoadBalancerReqInfo ¶
type LoadBalancerReqInfo struct { Name string `json:"name" required:"true"` IP string `json:"ip" required:"true"` Scheduler string `json:"scheduler" required:"true"` Port int `json:"port"` Protocol string `json:"protocol" required:"true"` Members []LoadBalancerReqMember `json:"members" required:"true"` MonitorType string `json:"monitorType" required:"true"` MaxConn int `json:"maxConn" required:"true"` StatsPort int `json:"statsPort" required:"true"` Type string `json:"type" required:"true"` ResponseTime int `json:"responseTime" required:"true"` // Health-Monitor IntervalTime int `json:"intervalTime" required:"true"` // Health-Monitor UnhealthyThreshold int `json:"unhealthyThreshold" required:"true"` // Health-Monitor HealthyThreshold int `json:"healthyThreshold" required:"true"` // Health-Monitor HttpUrl string `json:"httpUrl"` // Health-Monitor Description string `json:"description"` }
type LoadBalancerReqMember ¶
type LoadBalancerType ¶
type LoadBalancerType string
type LoadBalancerUpdateInfo ¶
Click to show internal directories.
Click to hide internal directories.