Documentation
¶
Index ¶
- func CCEServiceURL(client *golangsdk.ServiceClient, clusterID string, parts ...string) string
- type Address
- type Capacity
- type Condition
- type DaemonEndpoint
- type GetNode
- type GetResult
- type Image
- type ListNodes
- type ListResult
- type Metadata
- type MetadataLink
- type MetadataNode
- type Node
- type NodeInfo
- type PortEndpoint
- type Spec
- type Status
- type Taint
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CCEServiceURL ¶
Types ¶
type Capacity ¶
type Capacity struct {
CCEEni string `json:"cce/eni"`
CCESubEni string `json:"cce/sub-eni"`
CPU string `json:"cpu"`
EphemeralStorage string `json:"ephemeral-storage"`
HugePages1Gi string `json:"hugepages-1Gi"`
HugePages2Mi string `json:"hugepages-2Mi"`
Memory string `json:"memory"`
Pods string `json:"pods"`
}
type DaemonEndpoint ¶
type DaemonEndpoint struct {
KubeletEndpoint PortEndpoint `json:"kubeletEndpoint"`
}
type GetNode ¶
type GetNode struct {
Kind string `json:"kind"`
ApiVersion string `json:"apiVersion"`
Metadata MetadataNode `json:"metadata"`
Spec Spec `json:"spec"`
Status Status `json:"status"`
}
type GetResult ¶
type GetResult struct {
golangsdk.Result
}
type ListNodes ¶
type ListNodes struct {
Kind string `json:"kind"`
ApiVersion string `json:"apiVersion"`
Metadata MetadataLink `json:"metadata"`
Nodes []Node `json:"items"`
}
type ListResult ¶
type ListResult struct {
golangsdk.Result
}
func List ¶
func List(client *golangsdk.ServiceClient, clusterID string) (r ListResult)
List returns collection of nodes.
func (ListResult) Extract ¶
func (r ListResult) Extract() (*ListNodes, error)
type MetadataLink ¶
type MetadataNode ¶
type MetadataNode struct {
Name string `json:"name"`
SelfLink string `json:"selfLink"`
ID string `json:"uid"`
ResourceVersion string `json:"resourceVersion"`
CreationTimestamp string `json:"creationTimestamp"`
Labels map[string]interface{} `json:"labels"`
Annotations map[string]interface{} `json:"annotations"`
}
type Node ¶
type Node struct {
Metadata MetadataNode `json:"metadata"`
Spec Spec `json:"spec"`
Status Status `json:"status"`
}
type NodeInfo ¶
type NodeInfo struct {
MachineID string `json:"machineID"`
SystemUUID string `json:"systemUUID"`
BootID string `json:"bootID"`
KernelVersion string `json:"kernelVersion"`
OsImage string `json:"osImage"`
ContainerRuntimeVersion string `json:"containerRuntimeVersion"`
KubeletVersion string `json:"kubeletVersion"`
KubeProxyVersion string `json:"kubeProxyVersion"`
OperatingSystem string `json:"operatingSystem"`
Architecture string `json:"architecture"`
EniQuotaSize string `json:"eniQuotaSize"`
}
type PortEndpoint ¶
type PortEndpoint struct {
Port int `json:"Port"`
}
type Status ¶
type Status struct {
Capacity Capacity `json:"capacity"`
Allocatable Capacity `json:"allocatable"`
Conditions []Condition `json:"conditions"`
Addresses []Address `json:"addresses"`
DaemonEndpoints DaemonEndpoint `json:"daemonEndpoints"`
NodeInfo NodeInfo `json:"nodeInfo"`
Images []Image `json:"images"`
}
type UpdateOpts ¶
type UpdateOpts struct {
Metadata Metadata `json:"metadata,omitempty"`
}
UpdateOpts contains all the values needed to update a new node
func (UpdateOpts) ToNodeUpdateMap ¶
func (opts UpdateOpts) ToNodeUpdateMap() (map[string]interface{}, error)
ToNodeUpdateMap builds an update body based on UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
golangsdk.Result
}
func Update ¶
func Update(c *golangsdk.ServiceClient, clusterID, k8sName string, opts UpdateOptsBuilder) (r UpdateResult)
Update allows nodes to be updated.
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*GetNode, error)
Click to show internal directories.
Click to hide internal directories.