gophercloud: github.com/rackspace/gophercloud/rackspace/lb/v1/vips Index | Files

package vips

import "github.com/rackspace/gophercloud/rackspace/lb/v1/vips"

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

Package Files

doc.go requests.go results.go urls.go

func ExtractVIPs Uses

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.

func List Uses

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.

type CreateOpts Uses

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 Uses

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

ToVIPCreateMap casts a CreateOpts struct to a map.

type CreateOptsBuilder Uses

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

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 Uses

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

CreateResult represents the result of a create operation.

func Create Uses

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.

func (CreateResult) Extract Uses

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

type DeleteResult Uses

type DeleteResult struct {
    gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation.

func BulkDelete Uses

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 Uses

func Delete(c *gophercloud.ServiceClient, lbID, vipID int) DeleteResult

Delete is the operation responsible for permanently deleting a VIP.

type Type Uses

type Type string

Type represents the type of a VIP.

const (
    // PUBLIC indicates a VIP type that is routable on the public Internet.
    PUBLIC Type = "PUBLIC"

    // PRIVATE indicates a VIP type that is routable only on ServiceNet.
    PRIVATE Type = "SERVICENET"
)

type VIP Uses

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.

type VIPPage Uses

type VIPPage struct {
    pagination.SinglePageBase
}

VIPPage is the page returned by a pager when traversing over a collection of VIPs.

func (VIPPage) IsEmpty Uses

func (p VIPPage) IsEmpty() (bool, error)

IsEmpty checks whether a VIPPage struct is empty.

type Version Uses

type Version string

Version represents the version of a VIP.

const (
    IPV4 Version = "IPV4"
    IPV6 Version = "IPV6"
)

Convenient constants to use for type

Package vips imports 5 packages (graph) and is imported by 1 packages. Updated 2016-07-23. Refresh now. Tools for package owners.