kube

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDeployment

func DeleteDeployment(c Cluster, name string) error

func DeletePod

func DeletePod(c Cluster, name string) error

func DeploymentImage

func DeploymentImage(d Deployment) string

func DeploymentName

func DeploymentName(d Deployment) string

func DeploymentReady

func DeploymentReady(d Deployment) int32

func DeploymentReplicas

func DeploymentReplicas(d Deployment) int32

func NamespaceName

func NamespaceName(n NamespaceItem) string

func NodeName

func NodeName(n Node) string

func NodeReady

func NodeReady(n Node) bool

func NodeRoles

func NodeRoles(n Node) []string

func NodeVersion

func NodeVersion(n Node) string

func PodAge

func PodAge(p Pod) string

func PodEventName

func PodEventName(event PodEvent) string

func PodEventNamespace

func PodEventNamespace(event PodEvent) string

func PodEventPhase

func PodEventPhase(event PodEvent) string

func PodEventReady

func PodEventReady(event PodEvent) bool

func PodEventType

func PodEventType(event PodEvent) string

func PodIP

func PodIP(p Pod) string

func PodLabels

func PodLabels(p Pod) map[string]string

func PodLogs

func PodLogs(c Cluster, name string, handles ...ctx.Handle) (string, error)

func PodLogsTail

func PodLogsTail(c Cluster, name string, lines int64) (string, error)

func PodName

func PodName(p Pod) string

func PodNode

func PodNode(p Pod) string

func PodReady

func PodReady(p Pod) bool

func PodRestarts

func PodRestarts(p Pod) int32

func PodStatus

func PodStatus(p Pod) string

func RolloutRestart

func RolloutRestart(c Cluster, name string) error

func ScaleDeployment

func ScaleDeployment(c Cluster, name string, replicas int32) error

func ServiceClusterIP

func ServiceClusterIP(s Service) string

func ServiceName

func ServiceName(s Service) string

func ServicePorts

func ServicePorts(s Service) []string

func ServiceType

func ServiceType(s Service) string

func WaitDeploymentReady

func WaitDeploymentReady(c Cluster, name string, timeoutSeconds int64) error

func WaitDeploymentReadyCtx

func WaitDeploymentReadyCtx(c Cluster, h ctx.Handle, name string) error

func WaitPodReady

func WaitPodReady(c Cluster, name string, timeoutSeconds int64) error

func WaitPodReadyCtx

func WaitPodReadyCtx(c Cluster, h ctx.Handle, name string) error

Types

type Cluster

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

func Connect

func Connect() (Cluster, error)

func Namespace

func Namespace(c Cluster, ns string) Cluster

func Open

func Open(cfg Config) (Cluster, error)

type Config

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

func Context

func Context(cfg Config, name string) Config

func InCluster

func InCluster(cfg Config) Config

func Kubeconfig

func Kubeconfig(cfg Config, path string) Config

func New

func New() Config

func Retry added in v0.0.6

func Retry(cfg Config, maxAttempts int, delayMs int) Config

type Deployment

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

func Deployments

func Deployments(dl DeploymentList) []Deployment

func GetDeployment

func GetDeployment(c Cluster, name string) (Deployment, error)

type DeploymentList

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

func ListDeployments

func ListDeployments(c Cluster) (DeploymentList, error)

type NamespaceItem

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

func Namespaces

func Namespaces(nsl NamespaceList) []NamespaceItem

type NamespaceList

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

func ListNamespaces

func ListNamespaces(c Cluster) (NamespaceList, error)

type Node

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

func GetNode

func GetNode(c Cluster, name string) (Node, error)

func Nodes

func Nodes(nl NodeList) []Node

type NodeList

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

func ListNodes

func ListNodes(c Cluster) (NodeList, error)

type Pod

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

func GetPod

func GetPod(c Cluster, name string) (Pod, error)

func Pods

func Pods(pl PodList) []Pod

type PodEvent

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

func WatchPods

func WatchPods(c Cluster, timeoutSeconds int64) ([]PodEvent, error)

func WatchPodsCtx

func WatchPodsCtx(c Cluster, h ctx.Handle) ([]PodEvent, error)

type PodList

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

func ListPods

func ListPods(c Cluster) (PodList, error)

func ListPodsLabeled

func ListPodsLabeled(c Cluster, selector string) (PodList, error)

type Service

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

func GetService

func GetService(c Cluster, name string) (Service, error)

func Services

func Services(sl ServiceList) []Service

type ServiceList

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

func ListServices

func ListServices(c Cluster) (ServiceList, error)

Jump to

Keyboard shortcuts

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