Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, organizationID, projectID string, ...) (*openapi.ComputeClusterRead, error)
- func (c *Client) CreateConsoleSession(ctx context.Context, organizationID, projectID, clusterID, machineID string) (*regionapi.ConsoleSessionResponse, error)
- func (c *Client) CreateV2(ctx context.Context, request *computeapi.ClusterV2Create) (*computeapi.ClusterV2Read, error)
- func (c *Client) Delete(ctx context.Context, organizationID, projectID, clusterID string) error
- func (c *Client) DeleteV2(ctx context.Context, clusterID string) error
- func (c *Client) Evict(ctx context.Context, organizationID, projectID, clusterID string, ...) error
- func (c *Client) Get(ctx context.Context, organizationID, projectID, clusterID string) (*openapi.ComputeClusterRead, error)
- func (c *Client) GetConsoleOutput(ctx context.Context, organizationID, projectID, clusterID, machineID string, ...) (*regionapi.ConsoleOutputResponse, error)
- func (c *Client) GetRawV2(ctx context.Context, clusterID string) (*computev1.ComputeCluster, error)
- func (c *Client) GetV2(ctx context.Context, clusterID string) (*computeapi.ClusterV2Read, error)
- func (c *Client) HardRebootMachine(ctx context.Context, organizationID, projectID, clusterID, machineID string) error
- func (c *Client) List(ctx context.Context, organizationID string, ...) (openapi.ComputeClusters, error)
- func (c *Client) ListV2(ctx context.Context, params computeapi.GetApiV2ClustersParams) (computeapi.ClusterV2ReadList, error)
- func (c *Client) SoftRebootMachine(ctx context.Context, organizationID, projectID, clusterID, machineID string) error
- func (c *Client) StartMachine(ctx context.Context, organizationID, projectID, clusterID, machineID string) error
- func (c *Client) StopMachine(ctx context.Context, organizationID, projectID, clusterID, machineID string) error
- func (c *Client) Update(ctx context.Context, organizationID, projectID, clusterID string, ...) error
- func (c *Client) UpdateV2(ctx context.Context, clusterID string, request *computeapi.ClusterV2Update) (*computeapi.ClusterV2Read, error)
- type Options
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 wraps up cluster related management handling.
func NewClient ¶
func NewClient(client client.Client, namespace string, options *Options, identity identityapi.ClientWithResponsesInterface, region regionapi.ClientWithResponsesInterface) *Client
NewClient returns a new client with required parameters.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, organizationID, projectID string, request *openapi.ComputeClusterWrite) (*openapi.ComputeClusterRead, error)
Create creates the implicit cluster identified by the JWT claims.
func (*Client) CreateConsoleSession ¶ added in v1.8.0
func (*Client) CreateV2 ¶ added in v1.12.0
func (c *Client) CreateV2(ctx context.Context, request *computeapi.ClusterV2Create) (*computeapi.ClusterV2Read, error)
func (*Client) Evict ¶ added in v1.6.0
func (c *Client) Evict(ctx context.Context, organizationID, projectID, clusterID string, request *openapi.EvictionWrite) error
Evict is pretty complicated, we need to delete the requested servers from the region service, and update the cluster's pools to remove those instances so they don't just get recreated instantly. What we do is scale down the cluster, but annotate it with a the list of server IDs we'd like to delete.
func (*Client) GetConsoleOutput ¶ added in v1.8.0
func (c *Client) GetConsoleOutput(ctx context.Context, organizationID, projectID, clusterID, machineID string, params *openapi.GetApiV1OrganizationsOrganizationIDProjectsProjectIDClustersClusterIDMachinesMachineIDConsoleoutputParams) (*regionapi.ConsoleOutputResponse, error)
func (*Client) GetV2 ¶ added in v1.12.0
func (c *Client) GetV2(ctx context.Context, clusterID string) (*computeapi.ClusterV2Read, error)
func (*Client) HardRebootMachine ¶ added in v1.7.0
func (*Client) List ¶
func (c *Client) List(ctx context.Context, organizationID string, params openapi.GetApiV1OrganizationsOrganizationIDClustersParams) (openapi.ComputeClusters, error)
List returns all clusters owned by the implicit control plane.
func (*Client) ListV2 ¶ added in v1.12.0
func (c *Client) ListV2(ctx context.Context, params computeapi.GetApiV2ClustersParams) (computeapi.ClusterV2ReadList, error)
func (*Client) SoftRebootMachine ¶ added in v1.7.0
func (*Client) StartMachine ¶ added in v1.7.0
func (*Client) StopMachine ¶ added in v1.7.0
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, organizationID, projectID, clusterID string, request *openapi.ComputeClusterWrite) error
Update implements read/modify/write for the cluster.
func (*Client) UpdateV2 ¶ added in v1.12.0
func (c *Client) UpdateV2(ctx context.Context, clusterID string, request *computeapi.ClusterV2Update) (*computeapi.ClusterV2Read, error)
Click to show internal directories.
Click to hide internal directories.