load_balancer

package
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForListenerStatus

func WaitForListenerStatus(client *golangsdk.ServiceClient, id string, timeout int) error

Types

type ConfigureListenerOpts

type ConfigureListenerOpts struct {
	// These parameters passed to the load_balancers.ConfigureLoadBalancingListeners function.
	// Protocol type. HTTP and HTTPS are supported.
	Protocol string `json:"protocol" required:"true"`
	// Port.
	ProtocolPort int `json:"protocol_port" required:"true"`
	// Server certificate ID. This parameter is mandatory when protocol is set to HTTPS.
	ServerCertId string `json:"server_cert_id,omitempty"`
	// CA certificate ID. This parameter is mandatory when protocol is set to HTTPS and bidirectional authentication is used.
	CaCertId string `json:"ca_cert_id,omitempty"`
	// Type: searchTool indicates that the listener is configured for Elasticsearch/OpenSearch.
	// viewTool indicates that the listener is configured for Kibana/OpenSearch Dashboards.
	// The default value is searchTool.
	Type string `json:"type,omitempty"`
}

type ConfiguredListenerResp

type ConfiguredListenerResp struct {
	// ELB ID
	ElbId string `json:"elb_id"`
}

func ConfigureListener

func ConfigureListener(client *golangsdk.ServiceClient, clusterID string, opts ConfigureListenerOpts) (*ConfiguredListenerResp, error)

ConfigureListener will configure load balancer listener for a CSS cluster based on ConfigureListenerOpts.

type Elbv3Listener

type Elbv3Listener struct {
	// Listener id.
	Id string `json:"id"`
	// Listener name.
	Name string `json:"name"`
	// Protocol used by the listener
	Protocol string `json:"protocol"`
	// Port used by the listener.
	ProtocolPort int `json:"protocol_port"`
	// ipgroup information in the listener object.
	Ipgroup *ListenerIpGroup `json:"ipgroup"`
}

type EnableLoadBalancerOpts

type EnableLoadBalancerOpts struct {
	ElbId  string `json:"elb_id" required:"true"`
	Agency string `json:"agency" required:"true"`
}

EnableLoadBalancerOpts holds options for enabling the load balancer.

type IdListWrapper

type IdListWrapper struct {
	// Listener id.
	Id string `json:"id"`
}

type ListenerIpGroup

type ListenerIpGroup struct {
	// ID of the IP address group associated with the listener This parameter is mandatory during creation and is optional during update.
	IpgroupId string `json:"ipgroup_id"`
	// Status of an access control group. True: Enable access control. False: Disable access control.
	EnableIpgroup bool `json:"enable_ipgroup"`
}

type LoadBalancer

type LoadBalancer struct {
	// Load balancer ID.
	Id string `json:"id"`
	// Load balancer name
	Name string `json:"name"`
	// Whether the LB is for dedicated use. The value can be false (shared) or true (dedicated).
	Guaranteed string `json:"guaranteed"`
	// Resource billing information. If the value is left blank, the resource will be billed in pay-per-use mode. If the value is not left blank,
	// the resource is billed on a yearly/monthly basis.
	BillingInfo string `json:"billing_info"`
	// Description.
	Description string `json:"description"`
	// ID of the VPC to which the load balancer belongs
	VpcId string `json:"vpc_id"`
	// Provisioning status of the load balancer
	ProvisioningStatus string `json:"provisioning_status"`
	// Associated listener list
	Listeners []*IdListWrapper `json:"listeners"`
	// IPv4 virtual IP address bound to the load balancer
	VipAddress string `json:"vip_address"`
	// Port ID bound to the private IPv4 IP address of the load balancer.
	VipPortId string `json:"vip_port_id"`
	// IPv6 address of the load balancer.
	Ipv6VipAddress string `json:"ipv6_vip_address"`
	// EIP bound to the load balancer
	Publicips []*PublicIpInfo `json:"publicips"`
}

type LoadBalancerResp

type LoadBalancerResp struct {
	// The cluster agency
	Agency string `json:"agency"`
	// Server certificate name
	ServerCertName string `json:"serverCertName"`
	// Server certificate ID
	ServerCertId string `json:"serverCertId"`
	// CA certificate name
	CacertName string `json:"cacertName"`
	// CA certificate ID
	CacertId string `json:"cacertId"`
	// Indicates whether ELB is enabled
	Enabled bool `json:"elb_enable"`
	// Authentication mode
	AuthenticationType string `json:"authentication_type"`
	// Load balancer object information
	LoadBalancer LoadBalancer `json:"loadBalancer"`
	// Start time of automatic log backup.
	Listener Elbv3Listener `json:"listener"`
	// Indicates whether to enable the log function.
	Healthmonitors []*Member `json:"healthmonitors"`
}

func Get

This API is used to obtain information about the load balancers of a cluster.

type LoadbalancerSwitchResp

type LoadbalancerSwitchResp struct {
	ElbId string `json:"elb_id"`
}

func DisableLoadBalancer

func DisableLoadBalancer(client *golangsdk.ServiceClient, clusterID string) (*LoadbalancerSwitchResp, error)

DisableLoadBalancer disables the load balancer switch of a CSS cluster.

func EnableLoadBalancer

func EnableLoadBalancer(client *golangsdk.ServiceClient, clusterID string, opts EnableLoadBalancerOpts) (*LoadbalancerSwitchResp, error)

EnableLoadBalancer enables the load balancer switch of a CSS cluster.

type Member

type Member struct {
	// Member Id
	Id string `json:"id"`
	// Specifies the backend server name.
	Name string `json:"name"`
	// Private IP address bound to the backend server.
	Address string `json:"address"`
	// Specifies the port used by the backend server.
	ProtocolPort int `json:"protocol_port"`
	// Specifies the operating status of the backend server. - ONLINE: The backend server is running normally.
	// NO_MONITOR: No health check is configured for the backend server group to which the backend server belongs.
	// OFFLINE: The cloud server used as the backend server is stopped or does not exist.
	OperatingStatus string `json:"operating_status"`
	// ID of the instance used as the backend server. If this parameter is left blank, the backend server is not an ECS.
	InstanceId string `json:"instance_id"`
}

type PublicIpInfo

type PublicIpInfo struct {
	// EIP configuration ID
	PublicIpId string `json:"publicip_id"`
	// Specifies the EIP.
	PublicIpAddress string `json:"publicip_address"`
	// IP address version. Value range: 4 and 6. 4 indicates IPv4, and 6 indicates IPv6.
	IpVersion int `json:"ip_version"`
}

type UpdateListenerOpts

type UpdateListenerOpts struct {
	// Listener Object.
	Listener struct {
		// Server certificate ID. This parameter is mandatory when protocol is set to HTTPS.
		ServerCertId string `json:"default_tls_container_ref"`
		// CA certificate ID. This parameter is mandatory when protocol is set to HTTPS and bidirectional authentication is used.
		CaCertId string `json:"client_ca_tls_container_ref,omitempty"`
	} `json:"listener"`
	// Type: searchTool indicates that the load balancer is modified for Elasticsearch/OpenSearch.
	// viewTool indicates that the load balancer is modified for Kibana/OpenSearch Dashboards.
	// The default value is searchTool.
	Type string `json:"type,omitempty"`
}

type UpdateListenerResponse

type UpdateListenerResponse struct {
	// These parameters are part of an EsListenerResponse object.
	// Protocol used by the listener.
	Protocol string `json:"protocol"`
	// Listener ID.
	Id string `json:"id"`
	// Listener name.
	Name string `json:"name"`
	// Port used by the listener.
	ProtocolPort int `json:"protocol_port"`
	// Access control information of the listener object.
	Ipgroup struct {
		// These parameters are part of an EsIpgroupResource object.
		// ID of the IP address group associated with the listener.
		IpgroupId string `json:"ipgroup_id"`
		// Status of an access control group.
		EnableIpgroup bool `json:"enable_ipgroup"`
		// Type of an access control group.
		Type string `json:"type"`
	} `json:"ipgroup"`
}

func UpdateListener

func UpdateListener(client *golangsdk.ServiceClient, clusterID string, listenerID string, opts UpdateListenerOpts) (*UpdateListenerResponse, error)

UpdateLoadBalancerListener will update load balancing listeners for a CSS cluster based on UpdatingListenerOpts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL