clusters

package
v0.0.0-...-33ee089 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

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

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

func (opts GetOpts) ToClusterGetQuery() (string, error)

ToClusterGetQuery formats a GetOpts into a query string.

type GetOptsBuilder

type GetOptsBuilder interface {
	ToClusterGetQuery() (string, error)
}

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

func (opts ListOpts) ToClusterListQuery() (string, error)

ToClusterListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToClusterListQuery() (string, error)
}

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

type UpdateOptsBuilder interface {
	ToClusterUpdateMap() (map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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