Documentation ¶
Index ¶
- func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListLbServer(c *gophercloud.ServiceClient, opts ListLbServerOptsBuilder) pagination.Pager
- type AddServerOpts
- type AddServerOptsBuilder
- type AddServerResponse
- type AddServerResult
- type CreateNLBResponse
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type CreateTagOpts
- type CreateTagOptsBuilder
- type CreateTagResult
- type DeleteNLBResponse
- type DeleteOpts
- type DeleteOptsBuilder
- type DeleteResult
- type DeleteServerResponse
- type FailoverResult
- type GetResult
- type GetStatusesResult
- type LbServer
- type ListLbServerOpts
- type ListLbServerOptsBuilder
- type ListOpts
- type ListOptsBuilder
- type LoadBalancer
- type LoadBalancerPage
- type RemoveServerOpts
- type RemoveServerOptsBuilder
- type RemoveServerResponse
- type RemoveServerResult
- type Stats
- type StatsResult
- type StatusTree
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of load balancers. It accepts a ListOpts struct, which allows you to filter and sort the returned collection for greater efficiency.
Default policy settings return only those load balancers that are owned by the project who submits the request, unless an admin user submits the request.
func ListLbServer ¶
func ListLbServer(c *gophercloud.ServiceClient, opts ListLbServerOptsBuilder) pagination.Pager
Types ¶
type AddServerOpts ¶
type AddServerOpts struct { NlbID string `q:"loadbalancerid"` // Required VMID string `q:"virtualmachineid"` // Required IPAddress string `q:"ipaddress"` // Required. PublicPort string `q:"publicport"` // Required }
Add Load Balancer Server
func (AddServerOpts) ToLoadBalancerAddServerQuery ¶
func (opts AddServerOpts) ToLoadBalancerAddServerQuery() (string, error)
type AddServerOptsBuilder ¶
type AddServerResponse ¶
type AddServerResponse struct { Addserverresponse struct { NlbID int `json:"loadbalancerid"` // Caution!!) int ServiceID int `json:"serviceid"` VmID string `json:"virtualmachineid"` IPAddress string `json:"ipaddress"` PublicPort string `json:"publicport"` // Caution!!) API doc incorrect!! } `json:"addLoadBalancerWebServerresponse"` }
type AddServerResult ¶
type AddServerResult struct {
// contains filtered or unexported fields
}
func AddServer ¶
func AddServer(c *gophercloud.ServiceClient, opts AddServerOptsBuilder) (r AddServerResult)
func (AddServerResult) AddServerExtract ¶
func (r AddServerResult) AddServerExtract() (*AddServerResponse, error)
func (AddServerResult) DeleteNLBExtract ¶
func (r AddServerResult) DeleteNLBExtract() (*DeleteNLBResponse, error)
func (AddServerResult) Extract ¶
func (r AddServerResult) Extract() (*CreateNLBResponse, error)
Extract is a function that accepts a result and extracts a loadbalancer. func (r commonResult) CreateNLBExtract() (*CreateNLBResponse, error) {
func (AddServerResult) RemoveServerExtract ¶
func (r AddServerResult) RemoveServerExtract() (*RemoveServerResponse, error)
type CreateNLBResponse ¶
type CreateNLBResponse struct { Createnlbresponse struct { NLBId string `json:"loadbalancerid"` ZoneId string `json:"zoneid"` ZoneName string `json:"zonename"` ServiceIP string `json:"serviceip"` ServicePort string `json:"serviceport"` ServiceType string `json:"servicetype"` Name string `json:"name"` NLBOption string `json:"loadbalanceroption"` HealthCheckType string `json:"healthchecktype"` HealthCheckURL string `json:"healthcheckurl"` ErrorCode string `json:"errorcode"` ErrorText string `json:"errortext"` DisplayText string `json:"displaytext"` } `json:"createLoadBalancerresponse"` }
type CreateOpts ¶
type CreateOpts struct { Name string `q:"name"` // Required ZoneID string `q:"zoneid"` // Required. Zone ID that has the 'ServiceIP' NlbOption string `q:"loadbalanceroption"` // Required. roundrobin / leastconnection / leastresponse / sourceiphash / srcipsrcporthash ServiceIP string `q:"serviceip"` // Required. KT Cloud Virtual IP. // 'ServiceIP' : $$$ In case of an empty value(""), it is newly created. ServicePort string `q:"serviceport"` // Required ServiceType string `q:"servicetype"` // Required. NLB ServiceType : https / http / sslbridge / tcp / ftp HealthCheckType string `q:"healthchecktype"` // Required. HealthCheckType : http / https / tcp HealthCheckURL string `q:"healthcheckurl"` // Required. URL when the HealthCheckType is 'http' or 'https'. CipherGroupName string `q:"ciphergroupname"` // Required when ServiceType is 'https'. Set CipherGroup Name SSLv3 string `q:"sslv3"` // Required when ServiceType is 'https'. Use SSLv3? : 'DISABLED' / 'ENABLED' TLSv1 string `q:"tlsv1"` // Required when ServiceType is 'https'. Use TLSv1? : 'DISABLED' / 'ENABLED' TLSv11 string `q:"tlsv11"` // Required when ServiceType is 'https'. Use TLSv11? : 'DISABLED' / 'ENABLED' TLSv12 string `q:"tlsv12"` // Required when ServiceType is 'https'. Use TLSv12? : 'DISABLED' / 'ENABLED' NetworkID string `q:"networkid"` // Tier Network ID. Required in case of 'Enterprise Security' }
CreateOpts is the common options struct used in this package's Create operation.
func (CreateOpts) ToLoadBalancerCreateMap ¶
func (opts CreateOpts) ToLoadBalancerCreateMap() (map[string]interface{}, error)
ToLoadBalancerCreateMap builds a request body from CreateOpts.
func (CreateOpts) ToLoadBalancerCreateQuery ¶
func (opts CreateOpts) ToLoadBalancerCreateQuery() (string, error)
ToLoadBalancerListQuery formats a ListOpts into a query string.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation. Call its Extract method to interpret it as a LoadBalancer.
func Create ¶
func Create(c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func (CreateResult) AddServerExtract ¶
func (r CreateResult) AddServerExtract() (*AddServerResponse, error)
func (CreateResult) DeleteNLBExtract ¶
func (r CreateResult) DeleteNLBExtract() (*DeleteNLBResponse, error)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*CreateNLBResponse, error)
Extract is a function that accepts a result and extracts a loadbalancer. func (r commonResult) CreateNLBExtract() (*CreateNLBResponse, error) {
func (CreateResult) RemoveServerExtract ¶
func (r CreateResult) RemoveServerExtract() (*RemoveServerResponse, error)
type CreateTagOpts ¶
type CreateTagOpts struct { NlbID string `q:"loadbalancerid"` // Required Tag string `q:"tag"` // Required }
Create Tag for Load Balancer
func (CreateTagOpts) ToLoadBalancerCreateTagQuery ¶
func (opts CreateTagOpts) ToLoadBalancerCreateTagQuery() (string, error)
type CreateTagOptsBuilder ¶
type CreateTagResult ¶
type CreateTagResult struct {
// contains filtered or unexported fields
}
func CreateTag ¶
func CreateTag(c *gophercloud.ServiceClient, opts CreateTagOptsBuilder) (r CreateTagResult)
func (CreateTagResult) AddServerExtract ¶
func (r CreateTagResult) AddServerExtract() (*AddServerResponse, error)
func (CreateTagResult) DeleteNLBExtract ¶
func (r CreateTagResult) DeleteNLBExtract() (*DeleteNLBResponse, error)
func (CreateTagResult) Extract ¶
func (r CreateTagResult) Extract() (*CreateNLBResponse, error)
Extract is a function that accepts a result and extracts a loadbalancer. func (r commonResult) CreateNLBExtract() (*CreateNLBResponse, error) {
func (CreateTagResult) RemoveServerExtract ¶
func (r CreateTagResult) RemoveServerExtract() (*RemoveServerResponse, error)
type DeleteNLBResponse ¶
type DeleteOpts ¶
type DeleteOpts struct {
NlbID string `q:"loadbalancerid"`
}
DeleteOpts is the common options struct used in this package's Delete operation.
func (DeleteOpts) ToLoadBalancerDeleteQuery ¶
func (opts DeleteOpts) ToLoadBalancerDeleteQuery() (string, error)
ToLoadBalancerDeleteQuery formats a DeleteOpts into a query string.
type DeleteOptsBuilder ¶
DeleteOptsBuilder allows extensions to add additional parameters to the Delete request.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(c *gophercloud.ServiceClient, opts DeleteOptsBuilder) (r DeleteResult)
Delete will permanently delete a particular LoadBalancer based on its unique ID.
type DeleteServerResponse ¶
type FailoverResult ¶
type FailoverResult struct {
gophercloud.ErrResult
}
FailoverResult represents the result of a failover operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Failover ¶
func Failover(c *gophercloud.ServiceClient, id string) (r FailoverResult)
Failover performs a failover of a load balancer.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a LoadBalancer.
func (GetResult) AddServerExtract ¶
func (r GetResult) AddServerExtract() (*AddServerResponse, error)
func (GetResult) DeleteNLBExtract ¶
func (r GetResult) DeleteNLBExtract() (*DeleteNLBResponse, error)
func (GetResult) Extract ¶
func (r GetResult) Extract() (*CreateNLBResponse, error)
Extract is a function that accepts a result and extracts a loadbalancer. func (r commonResult) CreateNLBExtract() (*CreateNLBResponse, error) {
func (GetResult) RemoveServerExtract ¶
func (r GetResult) RemoveServerExtract() (*RemoveServerResponse, error)
type GetStatusesResult ¶
type GetStatusesResult struct {
gophercloud.Result
}
GetStatusesResult represents the result of a GetStatuses operation. Call its Extract method to interpret it as a StatusTree.
func GetStatuses ¶
func GetStatuses(c *gophercloud.ServiceClient, id string) (r GetStatusesResult)
GetStatuses will return the status of a particular LoadBalancer.
func (GetStatusesResult) Extract ¶
func (r GetStatusesResult) Extract() (*StatusTree, error)
Extract is a function that accepts a result and extracts the status of a Loadbalancer.
type LbServer ¶
type LbServer struct { NlbID int `json:"loadbalancerid"` // Caution!!) int ServiceID int `json:"serviceid"` VmID string `json:"virtualmachineid"` IPAddress string `json:"ipaddress"` PublicPort string `json:"publicport"` // Caution!!) API doc incorrect!! CurSrvRConnections int `json:"cursrvrconnections"` VmState string `json:"state"` ThroughputRate int `json:"throughputrate"` AvgSvrTTFB int `json:"avgsvrttfb"` RequestsRate int `json:"requestsrate"` }
func ExtractLbServers ¶
func ExtractLbServers(r pagination.Page) ([]LbServer, error)
type ListLbServerOpts ¶
type ListLbServerOpts struct {
NlbID string `q:"loadbalancerid"`
}
List Load Balancer
type ListLbServerOptsBuilder ¶
type ListOpts ¶
type ListOpts struct { Description string `q:"description"` AdminStateUp *bool `q:"admin_state_up"` ProjectID string `q:"project_id"` ProvisioningStatus string `q:"provisioning_status"` VipAddress string `q:"vip_address"` VipPortID string `q:"vip_port_id"` VipSubnetID string `q:"vip_subnet_id"` VipNetworkID string `q:"vip_network_id"` OperatingStatus string `q:"operating_status"` Name string `q:"name"` FlavorID string `q:"flavor_id"` AvailabilityZone string `q:"availability_zone"` Provider string `q:"provider"` Limit int `q:"limit"` Marker string `q:"marker"` SortKey string `q:"sort_key"` SortDir string `q:"sort_dir"` Tags []string `q:"tags"` TagsAny []string `q:"tags-any"` TagsNot []string `q:"not-tags"` TagsNotAny []string `q:"not-tags-any"` ZoneID string `q:"zoneid"` NlbID string `q:"loadbalancerid"` }
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 Loadbalancer attributes you want to see returned. SortKey allows you to sort by a particular attribute. SortDir sets the direction, and is either `asc' or `desc'. Marker and Limit are used for pagination.
func (ListOpts) ToLbServerListQuery ¶
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 { CertificateName string `json:"certificatename"` CipherGroupName string `json:"cipherGroupName"` ClientIpYn string `json:"clientIpYn"` EstablishedConn int `json:"establishedconn"` // Caution!!) int HealthCheckType string `json:"healthchecktype"` // Health CheckType : http / https / tcp HealthCheckURL string `json:"healthcheckurl"` NlbID int `json:"loadbalancerid"` // Caution!!) int NlbOption string `json:"loadbalanceroption"` Name string `json:"name"` NetworkID string `json:"networkid"` RequestsRate int ` json:"requestsrate"` // Caution!!) int ServiceIP string `json:"serviceip"` ServicePort string `json:"serviceport"` ServiceType string `json:"servicetype"` // NLB Service Type : https / http / sslbridge / tcp / ftp SSLv2 string `json:"sslv2"` SSLv3 string `json:"sslv3"` State string `json:"state"` Tag string `json:"tag"` TLSv1 string `json:"tlsv1"` TLSv11 string `json:"tlsv11"` TLSv12 string `json:"tlsv12"` ZoneID string `json:"zoneid"` ZoneName string `json:"zonename"` }
func ExtractLoadBalancers ¶
func ExtractLoadBalancers(r pagination.Page) ([]LoadBalancer, error)
ExtractLoadBalancers accepts a Page struct, specifically a LoadbalancerPage struct, and extracts the elements into a slice of LoadBalancer structs. In other words, a generic collection is mapped into a relevant slice.
func (*LoadBalancer) UnmarshalJSON ¶
func (r *LoadBalancer) UnmarshalJSON(b []byte) error
type LoadBalancerPage ¶
type LoadBalancerPage struct {
pagination.LinkedPageBase
}
LoadBalancerPage is the page returned by a pager when traversing over a collection of load balancers.
func (LoadBalancerPage) IsEmpty ¶
func (r LoadBalancerPage) IsEmpty() (bool, error)
IsEmpty checks whether a LoadBalancerPage struct is empty.
func (LoadBalancerPage) NextPageURL ¶
func (r LoadBalancerPage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of load balancers 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 RemoveServerOpts ¶
type RemoveServerOpts struct {
ServiceID string `q:"serviceid"` // Required
}
Remove Load Balancer Server
func (RemoveServerOpts) ToLoadBalancerRemoveServerQuery ¶
func (opts RemoveServerOpts) ToLoadBalancerRemoveServerQuery() (string, error)
type RemoveServerOptsBuilder ¶
type RemoveServerResponse ¶
type RemoveServerResult ¶
type RemoveServerResult struct {
// contains filtered or unexported fields
}
func RemoveServer ¶
func RemoveServer(c *gophercloud.ServiceClient, opts RemoveServerOptsBuilder) (r RemoveServerResult)
func (RemoveServerResult) AddServerExtract ¶
func (r RemoveServerResult) AddServerExtract() (*AddServerResponse, error)
func (RemoveServerResult) DeleteNLBExtract ¶
func (r RemoveServerResult) DeleteNLBExtract() (*DeleteNLBResponse, error)
func (RemoveServerResult) Extract ¶
func (r RemoveServerResult) Extract() (*CreateNLBResponse, error)
Extract is a function that accepts a result and extracts a loadbalancer. func (r commonResult) CreateNLBExtract() (*CreateNLBResponse, error) {
func (RemoveServerResult) RemoveServerExtract ¶
func (r RemoveServerResult) RemoveServerExtract() (*RemoveServerResponse, error)
type Stats ¶
type Stats struct { // The currently active connections. ActiveConnections int `json:"active_connections"` // The total bytes received. BytesIn int `json:"bytes_in"` // The total bytes sent. BytesOut int `json:"bytes_out"` // The total requests that were unable to be fulfilled. RequestErrors int `json:"request_errors"` // The total connections handled. TotalConnections int `json:"total_connections"` }
type StatsResult ¶
type StatsResult struct {
gophercloud.Result
}
StatsResult represents the result of a GetStats operation. Call its Extract method to interpret it as a Stats.
func GetStats ¶
func GetStats(c *gophercloud.ServiceClient, id string) (r StatsResult)
GetStats will return the shows the current statistics of a particular LoadBalancer.
func (StatsResult) Extract ¶
func (r StatsResult) Extract() (*Stats, error)
Extract is a function that accepts a result and extracts the status of a Loadbalancer.
type StatusTree ¶
type StatusTree struct {
Loadbalancer *LoadBalancer `json:"loadbalancer"`
}
StatusTree represents the status of a loadbalancer.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of an update operation. Call its Extract method to interpret it as a LoadBalancer.
func (UpdateResult) AddServerExtract ¶
func (r UpdateResult) AddServerExtract() (*AddServerResponse, error)
func (UpdateResult) DeleteNLBExtract ¶
func (r UpdateResult) DeleteNLBExtract() (*DeleteNLBResponse, error)
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*CreateNLBResponse, error)
Extract is a function that accepts a result and extracts a loadbalancer. func (r commonResult) CreateNLBExtract() (*CreateNLBResponse, error) {
func (UpdateResult) RemoveServerExtract ¶
func (r UpdateResult) RemoveServerExtract() (*RemoveServerResponse, error)