Documentation ¶
Index ¶
- func Create(c *gcorecloud.ServiceClient, opts CreateOptsBuilder, ...) (r tasks.Result)
- func Delete(c *gcorecloud.ServiceClient, listenerID string, ...) (r tasks.Result)
- func ExtractListenerIDFromTask(task *tasks.Task) (string, error)
- func ExtractListenersInto(r pagination.Page, v interface{}) error
- func List(c *gcorecloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func Unset(c *gcorecloud.ServiceClient, listenerID string, opts UnsetOptsBuilder, ...) (r tasks.Result)
- func Update(c *gcorecloud.ServiceClient, listenerID string, opts UpdateOptsBuilder, ...) (r tasks.Result)
- type CreateOpts
- type CreateOptsBuilder
- type CreateUserListOpts
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type Listener
- type ListenerPage
- type ListenerTaskResult
- type UnsetOpts
- type UnsetOptsBuilder
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
- type UserList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(c *gcorecloud.ServiceClient, opts CreateOptsBuilder, reqOpts *gcorecloud.RequestOpts) (r tasks.Result)
Create accepts a CreateOpts struct and creates a new listener using the values provided.
func Delete ¶
func Delete(c *gcorecloud.ServiceClient, listenerID string, reqOpts *gcorecloud.RequestOpts) (r tasks.Result)
Delete accepts a unique ID and deletes the listener associated with it.
func ExtractListenersInto ¶
func ExtractListenersInto(r pagination.Page, v interface{}) error
func List ¶
func List(c *gcorecloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
func Unset ¶ added in v0.7.7
func Unset(c *gcorecloud.ServiceClient, listenerID string, opts UnsetOptsBuilder, reqOpts *gcorecloud.RequestOpts) (r tasks.Result)
Unset accepts an UnsetOpts struct and unsets an existing listner fields using values provided.
func Update ¶
func Update(c *gcorecloud.ServiceClient, listenerID string, opts UpdateOptsBuilder, reqOpts *gcorecloud.RequestOpts) (r tasks.Result)
Update accepts a UpdateOpts struct and updates an existing listener using the values provided. For more information, see the Create function.
Types ¶
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true" validate:"required,name"` Protocol types.ProtocolType `json:"protocol" required:"true"` ProtocolPort int `json:"protocol_port" required:"true"` LoadBalancerID string `json:"loadbalancer_id" required:"true"` InsertXForwarded bool `json:"insert_x_forwarded"` SecretID string `json:"secret_id,omitempty"` SNISecretID []string `json:"sni_secret_id,omitempty"` AllowedCIDRS []string `json:"allowed_cidrs,omitempty" validate:"omitempty,dive,cidr"` TimeoutClientData *int `json:"timeout_client_data,omitempty"` TimeoutMemberData *int `json:"timeout_member_data,omitempty"` TimeoutMemberConnect *int `json:"timeout_member_connect,omitempty"` ConnectionLimit *int `json:"connection_limit,omitempty"` UserList []CreateUserListOpts `json:"user_list,omitempty"` }
CreateOpts represents options used to create a listener pool.
func (CreateOpts) ToListenerCreateMap ¶
func (opts CreateOpts) ToListenerCreateMap() (map[string]interface{}, error)
ToListenerCreateMap builds a request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateUserListOpts ¶ added in v0.7.6
type CreateUserListOpts struct { Username string `json:"username" required:"true"` EncryptedPassword string `json:"encrypted_password" required:"true"` }
CreateUserListOpts represent options used to create a user list.
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 Listener.
func Get ¶
func Get(c *gcorecloud.ServiceClient, id string) (r GetResult)
Get retrieves a specific listener based on its unique ID.
func (GetResult) Extract ¶
Extract is a function that accepts a result and extracts a listener resource.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type ListOpts ¶
type ListOpts struct {
LoadBalancerID *string `q:"loadbalancer_id"`
}
ListOpts allows the filtering and sorting of paginated collections through the API.
func (ListOpts) ToListenerListQuery ¶
ToListenerListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type Listener ¶
type Listener struct { PoolCount int `json:"pool_count"` ProtocolPort int `json:"protocol_port"` Protocol types.ProtocolType `json:"protocol"` Name string `json:"name"` ID string `json:"id"` ProvisioningStatus types.ProvisioningStatus `json:"provisioning_status"` OperationStatus types.OperatingStatus `json:"operating_status"` CreatorTaskID *string `json:"creator_task_id"` TaskID *string `json:"task_id"` SecretID *string `json:"secret_id"` SNISecretID []string `json:"sni_secret_id,omitempty"` AllowedCIDRS []string `json:"allowed_cidrs,omitempty" validate:"omitempty,dive,cidr"` TimeoutClientData *int `json:"timeout_client_data,omitempty"` TimeoutMemberData *int `json:"timeout_member_data,omitempty"` TimeoutMemberConnect *int `json:"timeout_member_connect,omitempty"` ConnectionLimit *int `json:"connection_limit"` UserList []UserList `json:"user_list"` }
Listener represents a listener structure.
func ExtractListeners ¶
func ExtractListeners(r pagination.Page) ([]Listener, error)
ExtractListener 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.
func ListAll ¶
func ListAll(c *gcorecloud.ServiceClient, opts ListOptsBuilder) ([]Listener, error)
ListAll returns all LBs
type ListenerPage ¶
type ListenerPage struct {
pagination.LinkedPageBase
}
ListenerPage is the page returned by a pager when traversing over a collection of listeners.
func (ListenerPage) IsEmpty ¶
func (r ListenerPage) IsEmpty() (bool, error)
IsEmpty checks whether a ListenerPage struct is empty.
func (ListenerPage) NextPageURL ¶
func (r ListenerPage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of listeners 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 ListenerTaskResult ¶
type ListenerTaskResult struct {
Listeners []string `json:"listeners"`
}
type UnsetOpts ¶ added in v0.7.7
UnsetOpts represents options used to unset lbpool fields.
func (UnsetOpts) ToListenerUnsetMap ¶ added in v0.7.7
ToLbListenerUnsetMap builds a request body from UnsetOpts.
type UnsetOptsBuilder ¶ added in v0.7.7
UnsetOptsBuilder allows extensions to add additional parameters to the Unset request.
type UpdateOpts ¶
type UpdateOpts struct { Name string `json:"name,omitempty"` SecretID string `json:"secret_id,omitempty"` SNISecretID []string `json:"sni_secret_id,omitempty"` AllowedCIDRS []string `json:"allowed_cidrs,omitempty" validate:"omitempty,dive,cidr"` TimeoutClientData *int `json:"timeout_client_data,omitempty"` TimeoutMemberData *int `json:"timeout_member_data,omitempty"` TimeoutMemberConnect *int `json:"timeout_member_connect,omitempty"` ConnectionLimit *int `json:"connection_limit,omitempty"` UserList []CreateUserListOpts `json:"user_list,omitempty"` }
UpdateOpts represents options used to update a listener.
func (UpdateOpts) ToListenerUpdateMap ¶
func (opts UpdateOpts) ToListenerUpdateMap() (map[string]interface{}, error)
ToListenerUpdateMap builds a request body from UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
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 Listener.
func (UpdateResult) Extract ¶
Extract is a function that accepts a result and extracts a listener resource.
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error