loadbalancers

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bandwidth

type Bandwidth struct {
	// Name
	Name string `json:"name" required:"true"`

	// Size
	Size int `json:"size" required:"true"`

	// Charge Mode
	ChargeMode string `json:"charge_mode" required:"true"`

	// Share Type
	ShareType string `json:"share_type" required:"true"`

	// Billing Info.
	BillingInfo string `json:"billing_info,omitempty"`
}

Bandwidth

type BandwidthRef

type BandwidthRef struct {
	// Share Bandwidth ID
	ID string `json:"id" required:"true"`
}

BandwidthRef

type CreateOpts

type CreateOpts struct {
	// Human-readable name for the Loadbalancer. Does not have to be unique.
	Name string `json:"name,omitempty"`

	// Human-readable description for the Loadbalancer.
	Description string `json:"description,omitempty"`

	// The IP address of the Loadbalancer.
	VipAddress string `json:"vip_address,omitempty"`

	// The network on which to allocate the Loadbalancer's address.
	VipSubnetID string `json:"vip_subnet_cidr_id,omitempty"`

	// The V6 network on which to allocate the Loadbalancer's address.
	IpV6VipSubnetID string `json:"ipv6_vip_virsubnet_id,omitempty"`

	// The UUID of a l4 flavor.
	L4Flavor string `json:"l4_flavor_id,omitempty"`

	// Guaranteed.
	Guaranteed *bool `json:"guaranteed,omitempty"`

	// The VPC ID.
	VpcID string `json:"vpc_id,omitempty"`

	// Availability Zone List.
	AvailabilityZoneList []string `json:"availability_zone_list" required:"true"`

	// The UUID of the enterprise project who owns the Loadbalancer.
	EnterpriseProjectID string `json:"enterprise_project_id,omitempty"`

	// The tags of the Loadbalancer.
	Tags []Tag `json:"tags,omitempty"`

	// The administrative state of the Loadbalancer. A valid value is true (UP)
	// or false (DOWN).
	AdminStateUp *bool `json:"admin_state_up,omitempty"`

	// The UUID of a l7 flavor.
	L7Flavor string `json:"l7_flavor_id,omitempty"`

	// IPv6 Bandwidth.
	IPV6Bandwidth *BandwidthRef `json:"ipv6_bandwidth,omitempty"`

	// Public IP IDs.
	PublicIPIds []string `json:"publicip_ids,omitempty"`

	// Public IP.
	PublicIP *PublicIP `json:"publicip,omitempty"`

	// ELB VirSubnet IDs.
	ElbSubnetIds []string `json:"elb_virsubnet_ids,omitempty"`

	// IP Target Enable.
	IPTargetEnable *bool `json:"ip_target_enable,omitempty"`

	// Deletion Protection Enable.
	DeletionProtectionEnable *bool `json:"deletion_protection_enable,omitempty"`
}

CreateOpts is the common options struct used in this package's Create operation.

func (CreateOpts) ToLoadBalancerCreateMap

func (opts CreateOpts) ToLoadBalancerCreateMap() (map[string]interface{}, error)

ToLoadBalancerCreateMap builds a request body from CreateOpts.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToLoadBalancerCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

CreateResult represents the result of a create operation. Call its Extract method to interpret it as a LoadBalancer.

func Create

Create is an operation which provisions a new loadbalancer based on the configuration defined in the CreateOpts struct. Once the request is validated and progress has started on the provisioning process, a CreateResult will be returned.

func (CreateResult) Extract

func (r CreateResult) Extract() (*LoadBalancer, error)

Extract is a function that accepts a result and extracts a loadbalancer.

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Delete

func Delete(c *golangsdk.ServiceClient, id string) (r DeleteResult)

Delete will permanently delete a particular LoadBalancer based on its unique ID.

type EipInfo

type EipInfo struct {
	// Eip ID
	EipID string `json:"eip_id"`
	// Eip Address
	EipAddress string `json:"eip_address"`
	// Eip Address
	IpVersion int `json:"ip_version"`
}

EipInfo

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult represents the result of a get operation. Call its Extract method to interpret it as a LoadBalancer.

func Get

func Get(c *golangsdk.ServiceClient, id string) (r GetResult)

Get retrieves a particular Loadbalancer based on its unique ID.

func (GetResult) Extract

func (r GetResult) Extract() (*LoadBalancer, error)

Extract is a function that accepts a result and extracts a loadbalancer.

type GetStatusesResult

type GetStatusesResult struct {
	golangsdk.Result
}

GetStatusesResult represents the result of a GetStatuses operation. Call its Extract method to interpret it as a StatusTree.

func GetStatuses

func GetStatuses(c *golangsdk.ServiceClient, id string) (r GetStatusesResult)

GetStatuses will return the status of a particular LoadBalancer.

func (GetStatusesResult) Extract

func (r GetStatusesResult) Extract() (*StatusTree, error)

Extract is a function that accepts a result and extracts the status of a Loadbalancer.

type ListenerRef

type ListenerRef struct {
	ID string `json:"id"`
}

ListenerRef

type LoadBalancer

type LoadBalancer struct {
	// The unique ID for the LoadBalancer.
	ID string `json:"id"`

	// Human-readable description for the Loadbalancer.
	Description string `json:"description"`

	// The provisioning status of the LoadBalancer.
	// This value is ACTIVE, PENDING_CREATE or ERROR.
	ProvisioningStatus string `json:"provisioning_status"`

	// The administrative state of the Loadbalancer.
	// A valid value is true (UP) or false (DOWN).
	AdminStateUp bool `json:"admin_state_up"`

	// The name of the provider.
	Provider string `json:"provider"`

	// Pools are the pools related to this Loadbalancer.
	Pools []PoolRef `json:"pools"`

	// Listeners are the listeners related to this Loadbalancer.
	Listeners []ListenerRef `json:"listeners"`

	// The operating status of the LoadBalancer. This value is ONLINE or OFFLINE.
	OperatingStatus string `json:"operating_status"`

	// The IP address of the Loadbalancer.
	VipAddress string `json:"vip_address"`

	// The UUID of the subnet on which to allocate the virtual IP for the
	// Loadbalancer address.
	VipSubnetCidrID string `json:"vip_subnet_cidr_id"`

	// Human-readable name for the LoadBalancer. Does not have to be unique.
	Name string `json:"name"`

	// Owner of the LoadBalancer.
	ProjectID string `json:"project_id"`

	// The UUID of the port associated with the IP address.
	VipPortID string `json:"vip_port_id"`

	// The UUID of a flavor if set.
	Tags []Tag `json:"tags"`

	// Guaranteed.
	Guaranteed bool `json:"guaranteed"`

	// The VPC ID.
	VpcID string `json:"vpc_id"`

	// EIP Info.
	Eips []EipInfo `json:"eips"`

	// Ipv6 Vip Address.
	Ipv6VipAddress string `json:"ipv6_vip_address"`

	// Ipv6 Vip Virsubnet ID.
	Ipv6VipVirsubnetID string `json:"ipv6_vip_virsubnet_id"`

	// Ipv6 Vip Port ID.
	Ipv6VipPortID string `json:"ipv6_vip_port_id"`

	// Availability Zone List.
	AvailabilityZoneList []string `json:"availability_zone_list"`

	// The UUID of the enterprise project who owns the Loadbalancer.
	EnterpriseProjectID string `json:"enterprise_project_id"`

	// Billing Info.
	BillingInfo string `json:"billing_info"`

	// L4 Flavor ID.
	L4FlavorID string `json:"l4_flavor_id"`

	// L4 Scale Flavor ID.
	L4ScaleFlavorID string `json:"l4_scale_flavor_id"`

	// L7 Flavor ID.
	L7FlavorID string `json:"l7_flavor_id"`

	// L7 Scale Flavor ID.
	L7ScaleFlavorID string `json:"l7_scale_flavor_id"`

	// Public IP Info.
	PublicIps []PublicIpInfo `json:"publicips"`

	// Elb Virsubnet IDs.
	ElbVirsubnetIDs []string `json:"elb_virsubnet_ids"`

	// Elb Virsubnet Type.
	ElbVirsubnetType string `json:"elb_virsubnet_type"`

	// Ip Target Enable.
	IpTargetEnable bool `json:"ip_target_enable"`

	// Frozen Scene.
	FrozenScene string `json:"frozen_scene"`

	// Ipv6 Bandwidth.
	IPV6Bandwidth BandwidthRef `json:"ipv6_bandwidth"`

	// Deletion Protection Enable.
	DeletionProtectionEnable bool `json:"deletion_protection_enable"`
}

LoadBalancer is the primary load balancing configuration object that specifies the virtual IP address on which client traffic is received, as well as other details such as the load balancing method to be use, protocol, etc.

type PoolRef

type PoolRef struct {
	ID string `json:"id"`
}

PoolRef

type PublicIP

type PublicIP struct {
	// IP Version.
	IPVersion int `json:"ip_version,omitempty"`

	// Network Type
	NetworkType string `json:"network_type" required:"true"`

	// Billing Info.
	BillingInfo string `json:"billing_info,omitempty"`

	// Description.
	Description string `json:"description,omitempty"`

	// Bandwidth
	Bandwidth Bandwidth `json:"bandwidth" required:"true"`
}

PublicIP

type PublicIpInfo

type PublicIpInfo struct {
	// Public IP ID
	PublicIpID string `json:"publicip_id"`
	// Public IP Address
	PublicIpAddress string `json:"publicip_address"`
	// IP Version
	IpVersion int `json:"ip_version"`
}

PublicIPInfo

type StatusTree

type StatusTree struct {
	Loadbalancer *LoadBalancer `json:"loadbalancer"`
}

StatusTree represents the status of a loadbalancer.

type Tag

type Tag struct {
	// Tag Key
	Key string `json:"key,omitempty"`
	// Tag Value
	Value string `json:"value,omitempty"`
}

Tag

type UBandwidthRef

type UBandwidthRef struct {
	// Share Bandwidth ID
	ID *string `json:"id"`
}

UBandwidthRef

type UpdateOpts

type UpdateOpts struct {
	// Human-readable name for the Loadbalancer. Does not have to be unique.
	Name string `json:"name,omitempty"`

	// Human-readable description for the Loadbalancer.
	Description *string `json:"description,omitempty"`

	// The administrative state of the Loadbalancer. A valid value is true (UP)
	// or false (DOWN).
	AdminStateUp *bool `json:"admin_state_up,omitempty"`

	// The IP address of the Loadbalancer.
	VipAddress string `json:"vip_address,omitempty"`

	// The network on which to allocate the Loadbalancer's address.
	VipSubnetID *string `json:"vip_subnet_cidr_id"`

	// The V6 network on which to allocate the Loadbalancer's address.
	IpV6VipSubnetID *string `json:"ipv6_vip_virsubnet_id"`

	// The UUID of a l4 flavor.
	L4Flavor string `json:"l4_flavor_id,omitempty"`

	// The UUID of a l7 flavor.
	L7Flavor string `json:"l7_flavor_id,omitempty"`

	// IPv6 Bandwidth.
	IPV6Bandwidth *UBandwidthRef `json:"ipv6_bandwidth,omitempty"`

	// ELB VirSubnet IDs.
	ElbSubnetIds []string `json:"elb_virsubnet_ids,omitempty"`

	// IP Target Enable.
	IPTargetEnable *bool `json:"ip_target_enable,omitempty"`

	// Deletion Protection Enable.
	DeletionProtectionEnable *bool `json:"deletion_protection_enable,omitempty"`
}

UpdateOpts is the common options struct used in this package's Update operation.

func (UpdateOpts) ToLoadBalancerUpdateMap

func (opts UpdateOpts) ToLoadBalancerUpdateMap() (map[string]interface{}, error)

ToLoadBalancerUpdateMap builds a request body from UpdateOpts.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToLoadBalancerUpdateMap() (map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a LoadBalancer.

func Update

func Update(c *golangsdk.ServiceClient, id string, opts UpdateOpts) (r UpdateResult)

Update is an operation which modifies the attributes of the specified LoadBalancer.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*LoadBalancer, error)

Extract is a function that accepts a result and extracts a loadbalancer.

Jump to

Keyboard shortcuts

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