Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOpts ¶
type AddOpts struct { // server_id ServerId string `json:"server_id" required:"true"` // The load balancer on which to provision this listener. Address string `json:"address" required:"true"` }
CreateOpts is the common options struct used in this package's Create operation.
func (AddOpts) ToBackendAddMap ¶
ToBackendAddMap casts a CreateOpts struct to a map.
type AddOptsBuilder ¶
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 AddResult ¶
type AddResult struct {
// contains filtered or unexported fields
}
AddResult represents the result of a create operation.
func Add ¶
func Add(c *golangsdk.ServiceClient, listener_id string, opts AddOptsBuilder) (r AddResult)
Add is an operation which provisions a new Listeners based on the configuration defined in the AddOpts struct. Once the request is validated and progress has started on the provisioning process, a AddResult will be returned.
Users with an admin role can create Listeners on behalf of other tenants by specifying a TenantID attribute different than their own.
type Backend ¶
type Backend struct { // Specifies the private IP address of the backend ECS. ServerAddress string `json:"server_address"` // Specifies the backend ECS ID. ID string `json:"id"` // Specifies the floating IP address assigned to the backend ECS. Address string `json:"address"` // Specifies the backend ECS status. The value is ACTIVE, PENDING, or ERROR. Status string `json:"status"` // Specifies the health check status. The value is NORMAL, ABNORMAL, or UNAVAILABLE. HealthStatus string `json:"health_status"` // Specifies the time when information about the backend ECS was updated. UpdateTime string `json:"update_time"` // Specifies the time when the backend ECS was created. CreateTime string `json:"create_time"` // Specifies the backend ECS name. ServerName string `json:"server_name"` // Specifies the original back member ID. ServerID string `json:"server_id"` // Specifies the listener to which the backend ECS belongs. Listeners []map[string]interface{} `json:"listeners"` }
Backend is the primary load balancing configuration object that specifies the loadbalancer and port on which client traffic is received, as well as other details such as the load balancing method to be use, protocol, etc.
func ExtractBackend ¶
func ExtractBackend(r pagination.Page) ([]Backend, error)
ExtractBackend accepts a Page struct, specifically a ListenerPage struct, and extracts the elements into a slice of Listener structs. In other words, a generic collection is mapped into a relevant slice.
type BackendPage ¶
type BackendPage struct {
pagination.LinkedPageBase
}
ListenerPage is the page returned by a pager when traversing over a collection of routers.
func (BackendPage) IsEmpty ¶
func (r BackendPage) IsEmpty() (bool, error)
IsEmpty checks whether a RouterPage struct is empty.
func (BackendPage) NextPageURL ¶
func (r BackendPage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of routers 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 GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation.
type LoadBalancerID ¶
type LoadBalancerID struct { // backend member id to remove ID string `json:"id" required:"true"` }
type RemoveOpts ¶
type RemoveOpts struct {
RemoveMember []LoadBalancerID `json:"removeMember" required:"true"`
}
RemoveOpts is the common options struct used in this package's Remove operation.
func (RemoveOpts) ToBackendRemoveMap ¶
func (opts RemoveOpts) ToBackendRemoveMap() (map[string]interface{}, error)
ToBackendCreateMap casts a CreateOpts struct to a map.
type RemoveOptsBuilder ¶
RemoveOptsBuilder is the interface options structs have to satisfy in order to be used in the main Remove 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 RemoveResult ¶
type RemoveResult struct {
golangsdk.ErrResult
}
RemoveResult represents the result of a delete operation.
func Remove ¶
func Remove(c *golangsdk.ServiceClient, listener_id string, id string) (r RemoveResult)
Remove will permanently remove a particular backend based on its unique ID.