backendmember

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

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

func (opts AddOpts) ToBackendAddMap() (map[string]interface{}, error)

ToBackendAddMap casts a CreateOpts struct to a map.

type AddOptsBuilder

type AddOptsBuilder interface {
	ToBackendAddMap() (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 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.

func (AddResult) Extract

func (r AddResult) Extract() (*Backend, error)

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

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.

func Get

func Get(c *golangsdk.ServiceClient, listener_id, id string) (r GetResult)

Get retrieves a particular Health Monitor based on its unique ID.

func (GetResult) Extract

func (r GetResult) Extract() ([]Backend, error)

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

type RemoveOptsBuilder interface {
	ToBackendRemoveMap() (map[string]interface{}, error)
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL