gophercloud: github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/pools Index | Files

package pools

import "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/pools"

Index

Package Files

requests.go results.go urls.go

Constants

const (
    LBMethodRoundRobin       = "ROUND_ROBIN"
    LBMethodLeastConnections = "LEAST_CONNECTIONS"

    ProtocolTCP   = "TCP"
    ProtocolHTTP  = "HTTP"
    ProtocolHTTPS = "HTTPS"
)

Supported attributes for create/update operations.

func ExtractPools Uses

func ExtractPools(page pagination.Page) ([]Pool, error)

ExtractPools accepts a Page struct, specifically a RouterPage struct, and extracts the elements into a slice of Router structs. In other words, a generic collection is mapped into a relevant slice.

func List Uses

func List(c *gophercloud.ServiceClient, opts ListOpts) pagination.Pager

List returns a Pager which allows you to iterate over a collection of pools. It accepts a ListOpts struct, which allows you to filter and sort the returned collection for greater efficiency.

Default policy settings return only those pools that are owned by the tenant who submits the request, unless an admin user submits the request.

type AssociateResult Uses

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

AssociateResult represents the result of an association operation.

func AssociateMonitor Uses

func AssociateMonitor(c *gophercloud.ServiceClient, poolID, monitorID string) AssociateResult

AssociateMonitor will associate a health monitor with a particular pool. Once associated, the health monitor will start monitoring the members of the pool and will deactivate these members if they are deemed unhealthy. A member can be deactivated (status set to INACTIVE) if any of health monitors finds it unhealthy.

func DisassociateMonitor Uses

func DisassociateMonitor(c *gophercloud.ServiceClient, poolID, monitorID string) AssociateResult

DisassociateMonitor will disassociate a health monitor with a particular pool. When dissociation is successful, the health monitor will no longer check for the health of the members of the pool.

func (AssociateResult) Extract Uses

func (r AssociateResult) Extract() (*Pool, error)

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

type CreateOpts Uses

type CreateOpts struct {
    // Only required if the caller has an admin role and wants to create a pool
    // for another tenant.
    TenantID string

    // Required. Name of the pool.
    Name string

    // Required. The protocol used by the pool members, you can use either
    // ProtocolTCP, ProtocolHTTP, or ProtocolHTTPS.
    Protocol string

    // The network on which the members of the pool will be located. Only members
    // that are on this network can be added to the pool.
    SubnetID string

    // The algorithm used to distribute load between the members of the pool. The
    // current specification supports LBMethodRoundRobin and
    // LBMethodLeastConnections as valid values for this attribute.
    LBMethod string

    // The provider of the pool
    Provider string
}

CreateOpts contains all the values needed to create a new pool.

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, opts CreateOpts) CreateResult

Create accepts a CreateOpts struct and uses the values to create a new load balancer pool.

func (CreateResult) Extract Uses

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

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

type DeleteResult Uses

type DeleteResult struct {
    gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation.

func Delete Uses

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

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

type GetResult Uses

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

GetResult represents the result of a get operation.

func Get Uses

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

Get retrieves a particular pool based on its unique ID.

func (GetResult) Extract Uses

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

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

type ListOpts Uses

type ListOpts struct {
    Status       string `q:"status"`
    LBMethod     string `q:"lb_method"`
    Protocol     string `q:"protocol"`
    SubnetID     string `q:"subnet_id"`
    TenantID     string `q:"tenant_id"`
    AdminStateUp *bool  `q:"admin_state_up"`
    Name         string `q:"name"`
    ID           string `q:"id"`
    VIPID        string `q:"vip_id"`
    Limit        int    `q:"limit"`
    Marker       string `q:"marker"`
    SortKey      string `q:"sort_key"`
    SortDir      string `q:"sort_dir"`
}

ListOpts allows the filtering and sorting of paginated collections through the API. Filtering is achieved by passing in struct field values that map to the floating IP attributes you want to see returned. SortKey allows you to sort by a particular network attribute. SortDir sets the direction, and is either `asc' or `desc'. Marker and Limit are used for pagination.

type Pool Uses

type Pool struct {
    // The status of the pool. Indicates whether the pool is operational.
    Status string

    // The load-balancer algorithm, which is round-robin, least-connections, and
    // so on. This value, which must be supported, is dependent on the provider.
    // Round-robin must be supported.
    LBMethod string `json:"lb_method" mapstructure:"lb_method"`

    // The protocol of the pool, which is TCP, HTTP, or HTTPS.
    Protocol string

    // Description for the pool.
    Description string

    // The IDs of associated monitors which check the health of the pool members.
    MonitorIDs []string `json:"health_monitors" mapstructure:"health_monitors"`

    // The network on which the members of the pool will be located. Only members
    // that are on this network can be added to the pool.
    SubnetID string `json:"subnet_id" mapstructure:"subnet_id"`

    // Owner of the pool. Only an administrative user can specify a tenant ID
    // other than its own.
    TenantID string `json:"tenant_id" mapstructure:"tenant_id"`

    // The administrative state of the pool, which is up (true) or down (false).
    AdminStateUp bool `json:"admin_state_up" mapstructure:"admin_state_up"`

    // Pool name. Does not have to be unique.
    Name string

    // List of member IDs that belong to the pool.
    MemberIDs []string `json:"members" mapstructure:"members"`

    // The unique ID for the pool.
    ID  string

    // The ID of the virtual IP associated with this pool
    VIPID string `json:"vip_id" mapstructure:"vip_id"`

    // The provider
    Provider string
}

Pool represents a logical set of devices, such as web servers, that you group together to receive and process traffic. The load balancing function chooses a member of the pool according to the configured load balancing method to handle the new requests or connections received on the VIP address. There is only one pool per virtual IP.

type PoolPage Uses

type PoolPage struct {
    pagination.LinkedPageBase
}

PoolPage is the page returned by a pager when traversing over a collection of pools.

func (PoolPage) IsEmpty Uses

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

IsEmpty checks whether a PoolPage struct is empty.

func (PoolPage) NextPageURL Uses

func (p PoolPage) NextPageURL() (string, error)

NextPageURL is invoked when a paginated collection of pools has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.

type UpdateOpts Uses

type UpdateOpts struct {
    // Required. Name of the pool.
    Name string

    // The algorithm used to distribute load between the members of the pool. The
    // current specification supports LBMethodRoundRobin and
    // LBMethodLeastConnections as valid values for this attribute.
    LBMethod string
}

UpdateOpts contains the values used when updating a pool.

type UpdateResult Uses

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

UpdateResult represents the result of an update operation.

func Update Uses

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

Update allows pools to be updated.

func (UpdateResult) Extract Uses

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

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

Package pools imports 3 packages (graph) and is imported by 157 packages. Updated 2016-07-20. Refresh now. Tools for package owners.