Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Name is the name of the LoadBalancer. Name string `json:"name"` // Protocol of the service that is being load balanced Protocol string `json:"protocol"` // Port number for the service you are load balancing Port int32 `json:"port"` // Algorithm that defines how traffic should be directed between back-end nodes Algorithm string `json:"algorithm,omitempty"` // The list of virtualIps for a load balancer VirtualIps []virtualips.CreateOpts `json:"virtualIps"` Nodes []nodes.CreateOpts `json:"nodes"` }
CreateOpts contain the values necessary to create a loadbalancer
type CreateResult ¶
type CreateResult struct {
gophercloud.Result
}
CreateResult is the result of a Create operation
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOpts) (r CreateResult)
Create creates a requested loadbalancer
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*LoadBalancer, error)
Extract interprets a CreateResult as a LoadBalancer.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
method to determine if the call succeeded or failed.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id uint64) (r DeleteResult)
Delete deletes the specified loadbalancer ID.
type GetResult ¶
type GetResult struct {
gophercloud.Result
}
GetResult is the response from a Get operation. Call its Extract method to interpret it as a LoadBalancer.
func Get ¶
func Get(client *gophercloud.ServiceClient, id uint64) (r GetResult)
Get returns data about a specific load balancer by its ID.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*LoadBalancer, error)
Extract interprets a GetResult as a LoadBalancer.
type ListOpts ¶
type ListOpts struct { // Status of the LoadBalancer Status string `q:"status"` // Address of a node attached to the LoadBalancer Node string `q:"nodeaddress"` }
ListOpts contain options filtering LoadBalancers returned from a call to List.
func (ListOpts) ToLoadBalancerListQuery ¶
ToLoadBalancerListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type LoadBalancer ¶
type LoadBalancer struct { // ID is the unique ID of a load balancer. ID uint64 `json:"id"` // Name of the loadbalancer Name string `json:"name"` // Protocol of the service that is being load balanced Protocol string `json:"protocol"` // Port number for the service you are load balancing Port int32 `json:"port"` // Algorithm that defines how traffic should be directed between back-end nodes Algorithm string `json:"algorithm"` // The status of the load balancer Status string `json:"status"` // The timeout value for the load balancer and communications with its nodes Timeout uint `json:"timeout"` // The list of virtualIps for a load balancer VirtualIps []virtualips.VirtualIp `json:"virtualIps"` // Nodes servicing the requests Nodes []nodes.Node `json:"nodes"` // Created is the date when the load balancer was created. Created struct { Time string `json:"time"` } `json:"created"` // Updated is the date when the load balancer was updated. Updated struct { Time string `json:"time"` } `json:"updated"` }
LoadBalancer represents a load balancer returned by the Cloud Load Balancer API.
func ExtractLoadBalancers ¶
func ExtractLoadBalancers(r pagination.Page) ([]LoadBalancer, error)
ExtractLoadBalancers converts a page of List results into a slice of usable LoadBalancer structs.
type LoadBalancerPage ¶
type LoadBalancerPage struct {
pagination.LinkedPageBase
}
LoadBalancerPage contains a single page of all LoadBalancers return from a List operation. Use ExtractLoadBalancers to convert it into a slice of usable structs.
func (LoadBalancerPage) IsEmpty ¶
func (r LoadBalancerPage) IsEmpty() (bool, error)
IsEmpty returns true if response contains no LoadBalancer results.
func (LoadBalancerPage) NextPageURL ¶
func (page LoadBalancerPage) NextPageURL() (string, error)
NextPageURL uses the response's embedded link reference to navigate to the next page of results.