gke

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SetNodePoolSize = "SET_NODE_POOL_SIZE"

	Done    = "DONE"
	Running = "RUNNING"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.1.3

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v0.1.3

func NewClient(o Options) *Client

func (*Client) GetCluster added in v0.1.3

func (c *Client) GetCluster(project, location, name string) (*apis.Cluster, error)

GetCluster return a cluster if exists or nil otherwise

func (*Client) ListClusters added in v0.1.3

func (c *Client) ListClusters(project string) ([]*apis.Cluster, error)

ListClusters return all clusters is running in the input project

func (*Client) PauseCluster added in v0.1.3

func (c *Client) PauseCluster(cluster *apis.Cluster) error

PauseCluster pasue the input cluster. This function will pause all node pools in the input cluster regradless the current pools in the current cluster. This will helpful when you can ignore the pause action with some pools.

func (*Client) RefreshCluster added in v0.1.3

func (c *Client) RefreshCluster(cluster *apis.Cluster) error

RefreshCluster recreate the worker nodes of the input clusters. This function will ignore with a node pool has not `spot` or `preemptible` type

func (*Client) UnpauseCluster added in v0.1.3

func (c *Client) UnpauseCluster(cluster *apis.Cluster) error

UnpauseCluster unpause the input cluster. Similar with the PauseCluster function. This function just unpause the pools are presented in the input clusters.

type Operation added in v0.1.2

type Operation struct {
	Name          string `json:"name,omitempty"`
	OperationType string `json:"operation_type,omitempty"`
	StartTime     string `json:"start_time,omitempty"`
	EndTime       string `json:"end_time,omitempty"`
	TargetLink    string `json:"target_link,omitempty"`
	Zone          string `json:"zone,omitempty"`
	Status        string `json:"status,omitempty"`
}

type OperationFilter added in v0.1.2

type OperationFilter struct {
	Status        string
	OperationType string
}

type Options added in v0.1.3

type Options struct {
	Credentials string
}

Jump to

Keyboard shortcuts

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