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

package pools

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

Index

Package Files

requests.go results.go urls.go

Constants

const (
    LBMethodRoundRobin       LBMethod = "ROUND_ROBIN"
    LBMethodLeastConnections LBMethod = "LEAST_CONNECTIONS"
    LBMethodSourceIp         LBMethod = "SOURCE_IP"

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

Supported attributes for create/update operations.

func ExtractMembers Uses

func ExtractMembers(page pagination.Page) ([]Member, error)

ExtractMembers 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 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 ListOptsBuilder) 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.

func ListAssociateMembers Uses

func ListAssociateMembers(c *gophercloud.ServiceClient, poolID string, opts MemberListOptsBuilder) pagination.Pager

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

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

type AdminState Uses

type AdminState *bool

AdminState gives users a solid type to work with for create and update operations. It is recommended that users use the `Up` and `Down` enums.

var (
    Up   AdminState = &iTrue
    Down AdminState = &iFalse
)

Convenience vars for AdminStateUp values.

type AssociateResult Uses

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

AssociateResult represents the result of an association operation.

func CreateAssociateMember Uses

func CreateAssociateMember(c *gophercloud.ServiceClient, poolID string, opts MemberCreateOpts) AssociateResult

CreateAssociateMember will create and associate a Member with a particular Pool.

func (AssociateResult) Extract Uses

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

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

func (AssociateResult) ExtractMember Uses

func (r AssociateResult) ExtractMember() (*Member, error)

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

type CreateOpts Uses

type CreateOpts poolOpts

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

func (CreateOpts) ToPoolCreateMap Uses

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

ToPoolCreateMap casts a CreateOpts struct to a map.

type CreateOptsBuilder Uses

type CreateOptsBuilder interface {
    ToPoolCreateMap() (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, 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.

func (CreateResult) ExtractMember Uses

func (r CreateResult) ExtractMember() (*Member, error)

ExtractMember 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.

func DeleteMember Uses

func DeleteMember(c *gophercloud.ServiceClient, poolID string, memberID string) DeleteResult

DisassociateMember will remove and disassociate a Member from a particular Pool.

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 GetAssociateMember Uses

func GetAssociateMember(c *gophercloud.ServiceClient, poolID string, memberID string) GetResult

Get retrieves a particular Pool Member 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.

func (GetResult) ExtractMember Uses

func (r GetResult) ExtractMember() (*Member, error)

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

type LBMethod Uses

type LBMethod string

type ListOpts Uses

type ListOpts struct {
    LBMethod       string `q:"lb_algorithm"`
    Protocol       string `q:"protocol"`
    TenantID       string `q:"tenant_id"`
    AdminStateUp   *bool  `q:"admin_state_up"`
    Name           string `q:"name"`
    ID             string `q:"id"`
    LoadbalancerID string `q:"loadbalancer_id"`
    ListenerID     string `q:"listener_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 Pool attributes you want to see returned. SortKey allows you to sort by a particular Pool attribute. SortDir sets the direction, and is either `asc' or `desc'. Marker and Limit are used for pagination.

func (ListOpts) ToPoolListQuery Uses

func (opts ListOpts) ToPoolListQuery() (string, error)

ToPoolListQuery formats a ListOpts into a query string.

type ListOptsBuilder Uses

type ListOptsBuilder interface {
    ToPoolListQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request.

type ListenerID Uses

type ListenerID struct {
    ID string `mapstructure:"id" json:"id"`
}

type LoadBalancerID Uses

type LoadBalancerID struct {
    ID string `mapstructure:"id" json:"id"`
}

type Member Uses

type Member struct {
    // Name of the Member.
    Name string `json:"name" mapstructure:"name"`

    // Weight of Member.
    Weight int `json:"weight" mapstructure:"weight"`

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

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

    // parameter value for the subnet UUID.
    SubnetID string `json:"subnet_id" mapstructure:"subnet_id"`

    // The Pool to which the Member belongs.
    PoolID string `json:"pool_id" mapstructure:"pool_id"`

    // The IP address of the Member.
    Address string `json:"address" mapstructure:"address"`

    // The port on which the application is hosted.
    ProtocolPort int `json:"protocol_port" mapstructure:"protocol_port"`

    // The unique ID for the Member.
    ID  string
}

Member represents the application running on a backend server.

type MemberCreateOpts Uses

type MemberCreateOpts memberOpts

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

func (MemberCreateOpts) ToMemberCreateMap Uses

func (opts MemberCreateOpts) ToMemberCreateMap() (map[string]interface{}, error)

ToMemberCreateMap casts a CreateOpts struct to a map.

type MemberCreateOptsBuilder Uses

type MemberCreateOptsBuilder interface {
    ToMemberCreateMap() (map[string]interface{}, error)
}

MemberCreateOptsBuilder 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 MemberListOpts Uses

type MemberListOpts struct {
    Name         string `q:"name"`
    Weight       int    `q:"weight"`
    AdminStateUp *bool  `q:"admin_state_up"`
    TenantID     string `q:"tenant_id"`
    Address      string `q:"address"`
    ProtocolPort int    `q:"protocol_port"`
    ID           string `q:"id"`
    Limit        int    `q:"limit"`
    Marker       string `q:"marker"`
    SortKey      string `q:"sort_key"`
    SortDir      string `q:"sort_dir"`
}

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

func (MemberListOpts) ToMemberListQuery Uses

func (opts MemberListOpts) ToMemberListQuery() (string, error)

ToMemberListQuery formats a ListOpts into a query string.

type MemberListOptsBuilder Uses

type MemberListOptsBuilder interface {
    ToMemberListQuery() (string, error)
}

MemberListOptsBuilder allows extensions to add additional parameters to the Member List request.

type MemberPage Uses

type MemberPage struct {
    pagination.LinkedPageBase
}

MemberPage is the page returned by a pager when traversing over a collection of Members in a Pool.

func (MemberPage) IsEmpty Uses

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

IsEmpty checks whether a MemberPage struct is empty.

func (MemberPage) NextPageURL Uses

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

NextPageURL is invoked when a paginated collection of members 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 MemberUpdateOpts Uses

type MemberUpdateOpts memberOpts

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

func (MemberUpdateOpts) ToMemberUpdateMap Uses

func (opts MemberUpdateOpts) ToMemberUpdateMap() (map[string]interface{}, error)

ToMemberUpdateMap casts a UpdateOpts struct to a map.

type MemberUpdateOptsBuilder Uses

type MemberUpdateOptsBuilder interface {
    ToMemberUpdateMap() (map[string]interface{}, error)
}

MemberUpdateOptsBuilder is the interface options structs have to satisfy in order to be used in the main Update 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 Pool Uses

type Pool struct {
    // 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_algorithm" mapstructure:"lb_algorithm"`

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

    // Description for the Pool.
    Description string

    // A list of listeners objects IDs.
    Listeners []ListenerID `mapstructure:"listeners" json:"listeners"` //[]map[string]interface{}

    // A list of member objects IDs.
    Members []Member `mapstructure:"members" json:"members"`

    // The ID of associated health monitor.
    MonitorID string `json:"healthmonitor_id" mapstructure:"healthmonitor_id"`

    // 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

    // The unique ID for the Pool.
    ID  string

    // A list of load balancer objects IDs.
    Loadbalancers []LoadBalancerID `mapstructure:"loadbalancers" json:"loadbalancers"`

    // Indicates whether connections in the same session will be processed by the
    // same Pool member or not.
    Persistence SessionPersistence `mapstructure:"session_persistence" json:"session_persistence"`

    // The provider
    Provider string

    Monitor monitors.Monitor `mapstructure:"healthmonitor" json:"healthmonitor"`
}

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.

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 Protocol Uses

type Protocol string

type SessionPersistence Uses

type SessionPersistence struct {
    // The type of persistence mode
    Type string `mapstructure:"type" json:"type"`

    // Name of cookie if persistence mode is set appropriately
    CookieName string `mapstructure:"cookie_name" json:"cookie_name,omitempty"`
}

SessionPersistence represents the session persistence feature of the load balancing service. It attempts to force connections or requests in the same session to be processed by the same member as long as it is ative. Three types of persistence are supported:

SOURCE_IP: With this mode, all connections originating from the same source

IP address, will be handled by the same Member of the Pool.

HTTP_COOKIE: With this persistence mode, the load balancing function will

create a cookie on the first request from a client. Subsequent
requests containing the same cookie value will be handled by
the same Member of the Pool.

APP_COOKIE: With this persistence mode, the load balancing function will

rely on a cookie established by the backend application. All
requests carrying the same cookie value will be handled by the
same Member of the Pool.

type UpdateOpts Uses

type UpdateOpts poolOpts

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

func (UpdateOpts) ToPoolUpdateMap Uses

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

ToPoolUpdateMap casts a UpdateOpts struct to a map.

type UpdateOptsBuilder Uses

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

UpdateOptsBuilder is the interface options structs have to satisfy in order to be used in the main Update 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 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 UpdateOptsBuilder) UpdateResult

Update allows pools to be updated.

func UpdateAssociateMember Uses

func UpdateAssociateMember(c *gophercloud.ServiceClient, poolID string, memberID string, opts MemberUpdateOpts) UpdateResult

Update allows Member 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.

func (UpdateResult) ExtractMember Uses

func (r UpdateResult) ExtractMember() (*Member, error)

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

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