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

package members

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

Index

Package Files

requests.go results.go urls.go

func ExtractMembers Uses

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

ExtractMembers accepts a Page struct, specifically a MemberPage struct, and extracts the elements into a slice of Member 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 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. The IP address of the member.
    Address string

    // Required. The port on which the application is hosted.
    ProtocolPort int

    // Required. The pool to which this member will belong.
    PoolID string
}

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

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

func (CreateResult) Extract Uses

func (r CreateResult) Extract() (*Member, 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 member 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 member based on its unique ID.

func (GetResult) Extract Uses

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

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

type ListOpts Uses

type ListOpts struct {
    Status       string `q:"status"`
    Weight       int    `q:"weight"`
    AdminStateUp *bool  `q:"admin_state_up"`
    TenantID     string `q:"tenant_id"`
    PoolID       string `q:"pool_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"`
}

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

type Member struct {
    // The status of the member. Indicates whether the member is operational.
    Status string

    // Weight of member.
    Weight int

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

    // The pool to which the member belongs.
    PoolID string `json:"pool_id" mapstructure:"pool_id"`

    // The IP address of the member.
    Address string

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

type MemberPage struct {
    pagination.LinkedPageBase
}

MemberPage is the page returned by a pager when traversing over a collection of pool members.

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

type UpdateOpts struct {
    // The administrative state of the member, which is up (true) or down (false).
    AdminStateUp bool
}

UpdateOpts contains the values used when updating a pool member.

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 members to be updated.

func (UpdateResult) Extract Uses

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

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

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