cluster

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Version    string   `json:"version"`
	Nodes      []Node   `json:"nodes"`
	Namespaces []string `json:"namespaces"`
	Ingresses  []string `json:"ingresses"`
}

Cluster represents the basic information of a cluster.

func GatherClusterInfo

func GatherClusterInfo(ctx context.Context, kc *kube.KubernetesClient) (Cluster, error)

type InfoService

type InfoService interface {
	// contains filtered or unexported methods
}

type Node

type Node struct {
	Version string `json:"version"`
	Name    string `json:"name"`
	OS      string `json:"os"`
	CRI     string `json:"cri"`
	Kernel  string `json:"kernel"`
	IP      string `json:"ip"`
	Pods    []Pod  `json:"pods"`
	CPU     string `json:"cpu"`
	Memory  string `json:"memory"`
	Ready   bool   `json:"ready"`
	Master  bool   `json:"master"`
}

Node represents the basic information of a cluster node.

type Pod

type Pod struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

Pod represents the basic information of a pod.

Jump to

Keyboard shortcuts

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