Documentation ¶
Overview ¶
Package node provides the ability to retrieve and manage Kubernetes nodes of a cluster nodegroup through the MKS V1 API.
Example of getting a single node of a cluster nodegroup by its id
singleNode, _, err := node.Get(ctx, mksClient, clusterID, nodegroupID, nodeID) if err != nil { log.Fatal(err) } fmt.Printf("%+v\n", singleNode)
Example of reinstalling a single node of a cluster nodegroup by its id
_, err := node.Reinstall(ctx, mksClient, clusterID, nodegroupID, nodeID) if err != nil { log.Fatal(err) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Reinstall ¶
func Reinstall(ctx context.Context, client *v1.ServiceClient, clusterID, nodegroupID, nodeID string) (*v1.ResponseResult, error)
Reinstall requests to make reinstall of a single node of a cluster nodegroup by its id.
Types ¶
type View ¶
type View struct { // ID is the identifier of the node. ID string `json:"id"` // CreatedAt is the timestamp in UTC timezone of when the node has been created. CreatedAt *time.Time `json:"created_at"` // UpdatedAt is the timestamp in UTC timezone of when the node has been updated. UpdatedAt *time.Time `json:"updated_at"` // Hostname represents a hostname of the node. Hostname string `json:"hostname"` // IP represents IP address of the node. IP string `json:"ip"` // NodegroupID contains nodegroup identifier. NodegroupID string `json:"nodegroup_id"` }
View represents an unmarshalled node body from an API response.
Click to show internal directories.
Click to hide internal directories.