Documentation ¶
Index ¶
- type Client
- func (c *Client) DeleteNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error
- func (c *Client) ListNodePools(ctx context.Context, vkeID string, options *ListOptions) ([]NodePool, *Meta, error)
- func (c *Client) SetBaseUrl(baseURL string) (*Client, error)
- func (c *Client) SetUserAgent(userAgent string) *Client
- func (c *Client) UpdateNodePool(ctx context.Context, vkeID, nodePoolID string, updateReq *NodePoolReqUpdate) (*NodePool, error)
- type Links
- type ListOptions
- type Meta
- type Node
- type NodePool
- type NodePoolReqUpdate
- type Nodepools
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client that is used for HTTP requests
func (*Client) DeleteNodePoolInstance ¶
func (c *Client) DeleteNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error
DeleteNodePoolInstance will delete a specific instance from a nodepool
func (*Client) ListNodePools ¶
func (c *Client) ListNodePools(ctx context.Context, vkeID string, options *ListOptions) ([]NodePool, *Meta, error)
ListNodePools returns all nodepools on a given VKE cluster
func (*Client) SetBaseUrl ¶
SetBaseUrl sets the base URL
func (*Client) SetUserAgent ¶
SetUserAgent sets the user-agent for HTTP requests
func (*Client) UpdateNodePool ¶
func (c *Client) UpdateNodePool(ctx context.Context, vkeID, nodePoolID string, updateReq *NodePoolReqUpdate) (*NodePool, error)
UpdateNodePool updates a given nodepool
type ListOptions ¶
type ListOptions struct { PerPage int `url:"per_page,omitempty"` Cursor string `url:"cursor,omitempty"` }
ListOptions are the available fields that can be used with pagination
type Node ¶
type Node struct { ID string `json:"id"` DateCreated string `json:"date_created"` Label string `json:"label"` Status string `json:"status"` }
Node represents a node that will live within a nodepool
type NodePool ¶
type NodePool struct { ID string `json:"id"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` Label string `json:"label"` Plan string `json:"plan"` Status string `json:"status"` NodeQuantity int `json:"node_quantity"` Tag string `json:"tag"` Nodes []Node `json:"nodes"` AutoScaler bool `json:"auto_scaler"` MinNodes int `json:"min_nodes"` MaxNodes int `json:"max_nodes"` }
NodePool represents a pool of nodes that are grouped by their label and plan type
type NodePoolReqUpdate ¶
type NodePoolReqUpdate struct { NodeQuantity int `json:"node_quantity,omitempty"` Tag string `json:"tag,omitempty"` }
NodePoolReqUpdate struct used to update a node pool
type Nodepools ¶
type Nodepools interface { ListNodePools(ctx context.Context, vkeID string, options *ListOptions) ([]NodePool, *Meta, error) UpdateNodePool(ctx context.Context, vkeID, nodePoolID string, updateReq *NodePoolReqUpdate) (*NodePool, error) DeleteNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error }
Nodepools interface
Click to show internal directories.
Click to hide internal directories.