Documentation ¶
Overview ¶
Package lbpools provides access to load balancer pools associated with a RackConnect configuration. Load Balancer Pools must be configured in advance by your Network Security team to be eligible for use with RackConnect. If you do not see a pool that you expect to see, contact your Support team for further assistance. The Load Balancer Pool id returned by these calls is automatically generated by the RackConnect automation and will remain constant unless the Load Balancer Pool is renamed on your hardware load balancer. All Load Balancer Pools will currently return a status of ACTIVE. Future features may introduce additional statuses. Node status values are ADDING, ACTIVE, REMOVING, ADD_FAILED, and REMOVE_FAILED. The cloud_servers node count will only include Cloud Servers from the specified cloud account. Any dedicated servers or cloud servers from another cloud account on the same RackConnect Configuration will be counted as external nodes.
Index ¶
- func List(c *gophercloud.ServiceClient) pagination.Pager
- func ListNodes(c *gophercloud.ServiceClient, id string) pagination.Pager
- func ListNodesDetails(c *gophercloud.ServiceClient, id string) pagination.Pager
- func ListNodesDetailsForServer(c *gophercloud.ServiceClient, serverID string) pagination.Pager
- type CreateNodeResult
- type CreateNodesResult
- type DeleteNodeResult
- type DeleteNodesResult
- type GetNodeDetailsResult
- type GetNodeResult
- type GetResult
- type Node
- type NodeDetails
- type NodeDetailsForServer
- type NodeDetailsForServerPage
- type NodeDetailsPage
- type NodeOpts
- type NodePage
- type NodeResult
- type NodesOpts
- type Pool
- type PoolPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(c *gophercloud.ServiceClient) pagination.Pager
List returns all load balancer pools that are associated with RackConnect.
func ListNodes ¶
func ListNodes(c *gophercloud.ServiceClient, id string) pagination.Pager
ListNodes returns all load balancer pool nodes that are associated with RackConnect for the given LB pool ID.
func ListNodesDetails ¶
func ListNodesDetails(c *gophercloud.ServiceClient, id string) pagination.Pager
ListNodesDetails returns all load balancer pool nodes that are associated with RackConnect for the given LB pool ID with all their details.
func ListNodesDetailsForServer ¶
func ListNodesDetailsForServer(c *gophercloud.ServiceClient, serverID string) pagination.Pager
ListNodesDetailsForServer is similar to ListNodesDetails but only returns nodes for the given serverID.
Types ¶
type CreateNodeResult ¶
type CreateNodeResult struct {
NodeResult
}
CreateNodeResult represents the result of an CreateNode operation.
func CreateNode ¶
func CreateNode(c *gophercloud.ServiceClient, poolID, serverID string) CreateNodeResult
CreateNode adds the cloud server with the given serverID to the load balancer pool with the given poolID.
type CreateNodesResult ¶
type CreateNodesResult struct {
gophercloud.Result
}
CreateNodesResult represents the result of a CreateNodes operation.
func CreateNodes ¶
func CreateNodes(c *gophercloud.ServiceClient, opts NodesOpts) CreateNodesResult
CreateNodes adds the cloud servers with the given serverIDs to the corresponding load balancer pools with the given poolIDs.
func (CreateNodesResult) Extract ¶
func (r CreateNodesResult) Extract() ([]Node, error)
Extract is a function that extracts a slice of Nodes from a CreateNodesResult.
type DeleteNodeResult ¶
type DeleteNodeResult struct {
gophercloud.ErrResult
}
DeleteNodeResult represents the result of a DeleteNode operation.
func DeleteNode ¶
func DeleteNode(c *gophercloud.ServiceClient, poolID, nodeID string) DeleteNodeResult
DeleteNode removes the node with the given nodeID from the LB pool with the given poolID.
type DeleteNodesResult ¶
type DeleteNodesResult struct {
gophercloud.ErrResult
}
DeleteNodesResult represents the result of a DeleteNodes operation.
func DeleteNodes ¶
func DeleteNodes(c *gophercloud.ServiceClient, opts NodesOpts) DeleteNodesResult
DeleteNodes removes the cloud servers with the given serverIDs to the corresponding load balancer pools with the given poolIDs.
type GetNodeDetailsResult ¶
type GetNodeDetailsResult struct {
gophercloud.Result
}
GetNodeDetailsResult represents the result of an NodeDetails operation.
func GetNodeDetails ¶
func GetNodeDetails(c *gophercloud.ServiceClient, poolID, nodeID string) GetNodeDetailsResult
GetNodeDetails retrieves a specific LB pool node's details based on its unique ID and the LB pool's unique ID.
func (GetNodeDetailsResult) Extract ¶
func (r GetNodeDetailsResult) Extract() (*NodeDetails, error)
Extract is a function that extracts a NodeDetails from a NodeDetailsResult.
type GetNodeResult ¶
type GetNodeResult struct {
NodeResult
}
GetNodeResult represents the result of an GetNode operation.
func GetNode ¶
func GetNode(c *gophercloud.ServiceClient, poolID, nodeID string) GetNodeResult
GetNode retrieves a specific LB pool node (that is associated with RackConnect) based on its unique ID and the LB pool's unique ID.
type GetResult ¶
type GetResult struct {
gophercloud.Result
}
GetResult represents the result of a Get operation.
func Get ¶
func Get(c *gophercloud.ServiceClient, id string) GetResult
Get retrieves a specific load balancer pool (that is associated with RackConnect) based on its unique ID.
type Node ¶
type Node struct { // The unique ID of the LB node. ID string `mapstructure:"id"` // The cloud server (node) of the load balancer pool. CloudServer struct { // The cloud server ID. ID string `mapstructure:"id"` } `mapstructure:"cloud_server"` // The load balancer pool. LoadBalancerPool struct { // The LB pool ID. ID string `mapstructure:"id"` } `mapstructure:"load_balancer_pool"` // The status of the LB pool. Status string `mapstructure:"status"` // The details of the status of the LB pool. StatusDetail string `mapstructure:"status_detail"` // The time the LB node was created. CreatedAt time.Time `mapstructure:"-"` // The time the LB node was last updated. UpdatedAt time.Time `mapstructure:"-"` }
Node represents a load balancer pool node associated with a RackConnect configuration.
func ExtractNodes ¶
func ExtractNodes(page pagination.Page) ([]Node, error)
ExtractNodes extracts and returns a slice of Nodes. It is used while iterating over an lbpools.ListNodes call.
type NodeDetails ¶
type NodeDetails struct { // The unique ID of the LB node. ID string `mapstructure:"id"` // The cloud server (node) of the load balancer pool. CloudServer struct { // The cloud server ID. ID string `mapstructure:"id"` // The name of the server. Name string `mapstructure:"name"` // The cloud network for the cloud server. CloudNetwork struct { // The network ID. ID string `mapstructure:"id"` // The network name. Name string `mapstructure:"name"` // The network's private IPv4 address. PrivateIPv4 string `mapstructure:"private_ip_v4"` // The IP range for the network. CIDR string `mapstructure:"cidr"` // The datetime the network was created. CreatedAt time.Time `mapstructure:"-"` // The last datetime the network was updated. UpdatedAt time.Time `mapstructure:"-"` } `mapstructure:"cloud_network"` // The datetime the server was created. CreatedAt time.Time `mapstructure:"-"` // The datetime the server was last updated. UpdatedAt time.Time `mapstructure:"-"` } `mapstructure:"cloud_server"` // The load balancer pool. LoadBalancerPool Pool `mapstructure:"load_balancer_pool"` // The status of the LB pool. Status string `mapstructure:"status"` // The details of the status of the LB pool. StatusDetail string `mapstructure:"status_detail"` // The time the LB node was created. CreatedAt time.Time `mapstructure:"-"` // The time the LB node was last updated. UpdatedAt time.Time `mapstructure:"-"` }
NodeDetails represents a load balancer pool node associated with a RackConnect configuration with all its details.
func ExtractNodesDetails ¶
func ExtractNodesDetails(page pagination.Page) ([]NodeDetails, error)
ExtractNodesDetails extracts and returns a slice of NodeDetails. It is used while iterating over an lbpools.ListNodesDetails call.
type NodeDetailsForServer ¶
type NodeDetailsForServer struct { // The unique ID of the LB node. ID string `mapstructure:"id"` // The load balancer pool. LoadBalancerPool Pool `mapstructure:"load_balancer_pool"` // The status of the LB pool. Status string `mapstructure:"status"` // The details of the status of the LB pool. StatusDetail string `mapstructure:"status_detail"` // The time the LB node was created. CreatedAt time.Time `mapstructure:"-"` // The time the LB node was last updated. UpdatedAt time.Time `mapstructure:"-"` }
NodeDetailsForServer represents a load balancer pool node associated with a RackConnect configuration with all its details for a particular server.
func ExtractNodesDetailsForServer ¶
func ExtractNodesDetailsForServer(page pagination.Page) ([]NodeDetailsForServer, error)
ExtractNodesDetailsForServer extracts and returns a slice of NodeDetailsForServer. It is used while iterating over an lbpools.ListNodesDetailsForServer call.
type NodeDetailsForServerPage ¶
type NodeDetailsForServerPage struct {
pagination.SinglePageBase
}
NodeDetailsForServerPage is the page returned by a pager when traversing over a collection of NodeDetailsForServer.
func (NodeDetailsForServerPage) IsEmpty ¶
func (r NodeDetailsForServerPage) IsEmpty() (bool, error)
IsEmpty returns true if a NodeDetailsForServerPage contains no NodeDetailsForServer.
type NodeDetailsPage ¶
type NodeDetailsPage struct {
pagination.SinglePageBase
}
NodeDetailsPage is the page returned by a pager when traversing over a collection of NodeDetails.
func (NodeDetailsPage) IsEmpty ¶
func (r NodeDetailsPage) IsEmpty() (bool, error)
IsEmpty returns true if a NodeDetailsPage contains no NodeDetails.
type NodePage ¶
type NodePage struct {
pagination.SinglePageBase
}
NodePage is the page returned by a pager when traversing over a collection of Nodes.
type NodeResult ¶
type NodeResult struct {
gophercloud.Result
}
NodeResult represents a result that can be extracted as a Node.
func (NodeResult) Extract ¶
func (r NodeResult) Extract() (*Node, error)
Extract is a function that extracts a Node from a NodeResult.
type NodesOpts ¶
type NodesOpts []NodeOpts
NodesOpts are a slice of NodeOpts, passed as options for bulk operations.
func (NodesOpts) ToLBPoolCreateNodesMap ¶
ToLBPoolCreateNodesMap serializes a NodesOpts into a map to send in the request.
type Pool ¶
type Pool struct { // The unique ID of the load balancer pool. ID string `mapstructure:"id"` // The name of the load balancer pool. Name string `mapstructure:"name"` // The node counts associated witht the load balancer pool. NodeCounts struct { // The number of nodes associated with this LB pool for this account. CloudServers int `mapstructure:"cloud_servers"` // The number of nodes associated with this LB pool from other accounts. External int `mapstructure:"external"` // The total number of nodes associated with this LB pool. Total int `mapstructure:"total"` } `mapstructure:"node_counts"` // The port of the LB pool Port int `mapstructure:"port"` // The status of the LB pool Status string `mapstructure:"status"` // The details of the status of the LB pool StatusDetail string `mapstructure:"status_detail"` // The virtual IP of the LB pool VirtualIP string `mapstructure:"virtual_ip"` }
Pool represents a load balancer pool associated with a RackConnect configuration.
func ExtractPools ¶
func ExtractPools(page pagination.Page) ([]Pool, error)
ExtractPools extracts and returns Pools. It is used while iterating over an lbpools.List call.
type PoolPage ¶
type PoolPage struct {
pagination.SinglePageBase
}
PoolPage is the page returned by a pager when traversing over a collection of Pools.