Documentation ¶
Overview ¶
Package clusters provides interaction with Limes at the cluster hierarchical level.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Update ¶
func Update(c *gophercloud.ServiceClient, clusterID string, opts UpdateOptsBuilder) error
Update modifies the attributes of a cluster.
Types ¶
type CommonResult ¶
type CommonResult struct {
gophercloud.Result
}
CommonResult is the result of a Get/List operation. Call its appropriate Extract method to interpret it as a Cluster or a slice of Clusters.
func Get ¶
func Get(c *gophercloud.ServiceClient, clusterID string, opts GetOptsBuilder) (r CommonResult)
Get retrieves details on a single cluster, by ID.
func List ¶
func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) (r CommonResult)
List enumerates the clusters to which the current token has access.
func (CommonResult) Extract ¶
func (r CommonResult) Extract() (*limes.ClusterReport, error)
Extract interprets a CommonResult as a Cluster.
func (CommonResult) ExtractClusters ¶
func (r CommonResult) ExtractClusters() ([]limes.ClusterReport, error)
ExtractClusters interprets a CommonResult as a slice of Clusters.
type GetOpts ¶
type GetOpts struct { Detail bool `q:"detail"` Local bool `q:"local"` Area string `q:"area"` Service string `q:"service"` Resource string `q:"resource"` }
GetOpts contains parameters for filtering a Get request.
func (GetOpts) ToClusterGetQuery ¶
ToClusterGetQuery formats a GetOpts into a query string.
type GetOptsBuilder ¶
GetOptsBuilder allows extensions to add additional parameters to the Get request.
type ListOpts ¶
type ListOpts struct { Detail bool `q:"detail"` Local bool `q:"local"` Area string `q:"area"` Service string `q:"service"` Resource string `q:"resource"` }
ListOpts contains parameters for filtering a List request
func (ListOpts) ToClusterListQuery ¶
ToClusterListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type UpdateOpts ¶
type UpdateOpts struct {
Services []limes.ServiceCapacityRequest `json:"services"`
}
UpdateOpts contains parameters to update a cluster.
func (UpdateOpts) ToClusterUpdateMap ¶
func (opts UpdateOpts) ToClusterUpdateMap() (map[string]interface{}, error)
ToClusterUpdateMap formats a UpdateOpts into a request body.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.