Documentation
¶
Index ¶
- func StreamPodLogs(ctx context.Context, kubeconfig, namespace, podName, container string, ...) (io.ReadCloser, error)
- type ClientOption
- type ClusterInfo
- type ConditionDetail
- type ConfigMapListItem
- type ContainerDetail
- type DeploymentListItem
- type EventDetail
- type NamespaceInfo
- type NamespaceResources
- type NodeInfo
- type PodDetail
- type PodListItem
- type SecretListItem
- type ServiceListItem
- type ServicePortItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamPodLogs ¶
func StreamPodLogs(ctx context.Context, kubeconfig, namespace, podName, container string, tailLines int64, opts ...ClientOption) (io.ReadCloser, error)
Types ¶
type ClientOption ¶
type ClientOption func(*clientOptions)
func WithContext ¶
func WithContext(contextName string) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
type ClusterInfo ¶
type ClusterInfo struct {
Version string `json:"version"`
Platform string `json:"platform"`
Nodes []NodeInfo `json:"nodes"`
Namespaces []NamespaceInfo `json:"namespaces"`
}
func GetClusterInfo ¶
func GetClusterInfo(ctx context.Context, kubeconfig string, opts ...ClientOption) (*ClusterInfo, error)
type ConditionDetail ¶
type ConfigMapListItem ¶
type ConfigMapListItem struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Data map[string]string `json:"data"`
Age string `json:"age"`
}
func GetNamespaceConfigMaps ¶
func GetNamespaceConfigMaps(ctx context.Context, kubeconfig, namespace string, opts ...ClientOption) ([]ConfigMapListItem, error)
type ContainerDetail ¶
type DeploymentListItem ¶
type DeploymentListItem struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Ready string `json:"ready"`
UpToDate int32 `json:"up_to_date"`
Available int32 `json:"available"`
Age string `json:"age"`
Pods []PodListItem `json:"pods"`
}
func GetNamespaceDeployments ¶
func GetNamespaceDeployments(ctx context.Context, kubeconfig, namespace string, opts ...ClientOption) ([]DeploymentListItem, error)
type EventDetail ¶
type NamespaceInfo ¶
type NamespaceResources ¶
type NamespaceResources struct {
Namespace string `json:"namespace"`
Pods int `json:"pods"`
Deployments int `json:"deployments"`
Services int `json:"services"`
ConfigMaps int `json:"config_maps"`
Secrets int `json:"secrets"`
PVCs int `json:"pvcs"`
ServiceAccounts int `json:"service_accounts"`
}
func GetNamespaceResources ¶
func GetNamespaceResources(ctx context.Context, kubeconfig, namespace string, opts ...ClientOption) (*NamespaceResources, error)
type PodDetail ¶
type PodDetail struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Status string `json:"status"`
NodeName string `json:"node_name"`
PodIP string `json:"pod_ip"`
HostIP string `json:"host_ip"`
CreationTime string `json:"creation_time"`
Age string `json:"age"`
Ready string `json:"ready"`
RestartCount int32 `json:"restart_count"`
QosClass string `json:"qos_class"`
Containers []ContainerDetail `json:"containers"`
Conditions []ConditionDetail `json:"conditions"`
Events []EventDetail `json:"events"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
YAML string `json:"yaml"`
}
func GetPodDetail ¶
type PodListItem ¶
type PodListItem struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Status string `json:"status"`
NodeName string `json:"node_name"`
PodIP string `json:"pod_ip"`
Age string `json:"age"`
Ready string `json:"ready"`
RestartCount int32 `json:"restart_count"`
}
func GetNamespacePods ¶
func GetNamespacePods(ctx context.Context, kubeconfig, namespace string, opts ...ClientOption) ([]PodListItem, error)
type SecretListItem ¶
type SecretListItem struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Type string `json:"type"`
Data map[string]string `json:"data"`
Age string `json:"age"`
}
func GetNamespaceSecrets ¶
func GetNamespaceSecrets(ctx context.Context, kubeconfig, namespace string, opts ...ClientOption) ([]SecretListItem, error)
type ServiceListItem ¶
type ServiceListItem struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Type string `json:"type"`
ClusterIP string `json:"cluster_ip"`
Ports []ServicePortItem `json:"ports"`
Age string `json:"age"`
}
func GetNamespaceServices ¶
func GetNamespaceServices(ctx context.Context, kubeconfig, namespace string, opts ...ClientOption) ([]ServiceListItem, error)
Click to show internal directories.
Click to hide internal directories.