Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateLKEClusterPool(ctx context.Context, clusterID int, createOpts LKEClusterPoolCreateOptions) (*LKEClusterPool, error)
- func (c *Client) DeleteLKEClusterPool(ctx context.Context, clusterID, id int) error
- func (c *Client) ListLKEClusterPools(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterPool, error)
- func (c *Client) SetBaseURL(url string) *Client
- func (c *Client) SetUserAgent(ua string) *Client
- type LKEClusterPool
- type LKEClusterPoolCreateOptions
- type LKEClusterPoolDisk
- type LKEClusterPoolLinode
- type LKEClusterPoolResponse
- type LKELinodeStatus
- type ListOptions
- type PageOptions
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 is the struct to perform API calls
func (*Client) CreateLKEClusterPool ¶
func (c *Client) CreateLKEClusterPool(ctx context.Context, clusterID int, createOpts LKEClusterPoolCreateOptions) (*LKEClusterPool, error)
CreateLKEClusterPool creates a LKE Pool for for a LKE Cluster
func (*Client) DeleteLKEClusterPool ¶
DeleteLKEClusterPool deletes the LKE Pool with the specified id
func (*Client) ListLKEClusterPools ¶
func (c *Client) ListLKEClusterPools(ctx context.Context, clusterID int, opts *ListOptions) ([]LKEClusterPool, error)
ListLKEClusterPools lists LKE Pools
func (*Client) SetBaseURL ¶
SetBaseURL sets the base URL of the Linode v4 API (https://api.linode.com/v4)
func (*Client) SetUserAgent ¶
SetUserAgent sets a custom user-agent for HTTP requests
type LKEClusterPool ¶
type LKEClusterPool struct { ID int `json:"id"` Count int `json:"count"` Type string `json:"type"` Disks []LKEClusterPoolDisk `json:"disks"` Linodes []LKEClusterPoolLinode `json:"nodes"` }
LKEClusterPool represents a LKE Pool
type LKEClusterPoolCreateOptions ¶
type LKEClusterPoolCreateOptions struct { Count int `json:"count"` Type string `json:"type"` Disks []LKEClusterPoolDisk `json:"disks"` }
LKEClusterPoolCreateOptions fields are those accepted by CreateLKEClusterPool
type LKEClusterPoolDisk ¶
LKEClusterPoolDisk represents a node disk in an LKEClusterPool object
type LKEClusterPoolLinode ¶
type LKEClusterPoolLinode struct { ID string `json:"id"` InstanceID int `json:"instance_id"` Status LKELinodeStatus `json:"status"` }
LKEClusterPoolLinode represents a node in a LKE Pool
type LKEClusterPoolResponse ¶
type LKEClusterPoolResponse struct { Pools []LKEClusterPool `json:"data"` PageOptions }
LKEClusterPoolResponse is the struct for unmarshaling response from the list of LKE pools API call
type LKELinodeStatus ¶
type LKELinodeStatus string
LKELinodeStatus represents the status of a node in a LKE Pool
const ( LKELinodeReady LKELinodeStatus = "ready" LKELinodeNotReady LKELinodeStatus = "not_ready" )
LKELinodeStatus constants reflect the current status of an node in a LKE Pool
type ListOptions ¶
type ListOptions struct { *PageOptions PageSize int Filter string }
ListOptions are the pagination and filtering parameters for endpoints
type PageOptions ¶
type PageOptions struct { Page int `json:"page"` Pages int `json:"pages"` Results int `json:"results"` }
PageOptions are the pagination parameters for List endpoints