Documentation ¶
Overview ¶
Package vips provides information and interaction with the Virtual IP API resource for the Rackspace Cloud Load Balancer service.
A virtual IP (VIP) makes a load balancer accessible by clients. The load balancing service supports either a public VIP, routable on the public Internet, or a ServiceNet address, routable only within the region in which the load balancer resides.
All load balancers must have at least one virtual IP associated with them at all times.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, loadBalancerID int) pagination.Pager
List is the operation responsible for returning a paginated collection of load balancer virtual IP addresses.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Optional - the ID of an existing virtual IP. By doing this, you are // allowing load balancers to share IPV6 addresses. ID string // Optional - the type of address. Type Type // Optional - the version of address. Version Version }
CreateOpts is the common options struct used in this package's Create operation.
func (CreateOpts) ToVIPCreateMap ¶
func (opts CreateOpts) ToVIPCreateMap() (map[string]interface{}, error)
ToVIPCreateMap casts a CreateOpts struct to a map.
type CreateOptsBuilder ¶
CreateOptsBuilder is the interface options structs have to satisfy in order to be used in the main Create operation in this package. Since many extensions decorate or modify the common logic, it is useful for them to satisfy a basic interface in order for them to be used.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation.
func Create ¶
func Create(c *gophercloud.ServiceClient, lbID int, opts CreateOptsBuilder) CreateResult
Create is the operation responsible for assigning a new Virtual IP to an existing load balancer resource. Currently, only version 6 IP addresses may be added.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult represents the result of a delete operation.
func BulkDelete ¶
func BulkDelete(c *gophercloud.ServiceClient, loadBalancerID int, vipIDs []int) DeleteResult
BulkDelete is the operation responsible for batch deleting multiple VIPs in a single operation. It accepts a slice of integer IDs and will remove them from the load balancer. The maximum limit is 10 VIP removals at once.
func Delete ¶
func Delete(c *gophercloud.ServiceClient, lbID, vipID int) DeleteResult
Delete is the operation responsible for permanently deleting a VIP.
type VIP ¶
type VIP struct { Address string `json:"address,omitempty"` ID int `json:"id,omitempty"` Type Type `json:"type,omitempty"` Version Version `json:"ipVersion,omitempty" mapstructure:"ipVersion"` }
VIP represents a Virtual IP API resource.
func ExtractVIPs ¶
func ExtractVIPs(page pagination.Page) ([]VIP, error)
ExtractVIPs accepts a Page struct, specifically a VIPPage struct, and extracts the elements into a slice of VIP structs. In other words, a generic collection is mapped into a relevant slice.
type VIPPage ¶
type VIPPage struct {
pagination.SinglePageBase
}
VIPPage is the page returned by a pager when traversing over a collection of VIPs.