k8s

package
v0.0.0-...-c14d6e2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient() (*kubernetes.Clientset, error)

NewClient creates a new Kubernetes client.

Types

type DeploymentResource

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

func NewDeploymentResource

func NewDeploymentResource(clientset *kubernetes.Clientset, namespace string) *DeploymentResource

func (*DeploymentResource) IsReady

func (r *DeploymentResource) IsReady(resource metav1.Object) bool

func (*DeploymentResource) Watch

func (r *DeploymentResource) Watch(ctx context.Context, namespace, name, labelSelector string) (chan metav1.Object, error)

type JobResource

type JobResource struct {
	Client batchv1.JobInterface
}

func NewJobResource

func NewJobResource(clientset *kubernetes.Clientset, namespace string) *JobResource

func (*JobResource) IsReady

func (jr *JobResource) IsReady(resource runtime.Object) bool

func (*JobResource) Watch

func (jr *JobResource) Watch(ctx context.Context, namespace string, name string, labelSelector string) (<-chan runtime.Object, error)

type PodResource

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

func NewPodResource

func NewPodResource(clientset *kubernetes.Clientset, namespace string) *PodResource

func (*PodResource) IsReady

func (r *PodResource) IsReady(resource metav1.Object) bool

func (*PodResource) Watch

func (r *PodResource) Watch(ctx context.Context, namespace, name, labelSelector string) (chan metav1.Object, error)

type Resource

type Resource struct {
	Watcher      ResourceWatcher
	ReadyChecker ResourceReadyChecker
}

func (*Resource) WaitForReady

func (r *Resource) WaitForReady(namespace string, name string, labelSelector string) error

type ResourceReadyChecker

type ResourceReadyChecker interface {
	IsReady(resource runtime.Object) bool
}

type ResourceWatcher

type ResourceWatcher interface {
	Watch(namespace string, name string, labelSelector string) (<-chan runtime.Object, error)
}

type ServiceResource

type ServiceResource struct {
	Client *corev1.CoreV1Client
}

func NewServiceResource

func NewServiceResource(client *corev1.CoreV1Client) *ServiceResource

func (*ServiceResource) IsReady

func (sr *ServiceResource) IsReady(resource runtime.Object) bool

func (*ServiceResource) Watch

func (sr *ServiceResource) Watch(ctx context.Context, namespace string, name string, labelSelector string) (chan runtime.Object, error)

Jump to

Keyboard shortcuts

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