Documentation ¶
Overview ¶
Package pod manipulates the k8s api of pod object
Index ¶
- type Option
- type Pod
- func (p *Pod) Delete(namespace, name string) error
- func (p *Pod) Get(namespace, name string) (*corev1.Pod, error)
- func (p *Pod) GetNamespacedPodsStatus(pods []corev1.Pod, serviceName string) ([]PodStatus, error)
- func (p *Pod) ListAllNamespace(fieldSelectors []string) (*corev1.PodList, error)
- func (p *Pod) ListNamespacePods(namespace string) (*corev1.PodList, error)
- func (p *Pod) UnreadyPodReason(pod *corev1.Pod) (UnreadyReason, string)
- func (p *Pod) WatchAllNamespace(ctx context.Context, addFunc, modifyFunc, delFunc func(*corev1.Pod)) error
- type PodStatus
- type UnreadyReason
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Pod)
Option configures a Pod
func WithK8sClient ¶
func WithK8sClient(k8sClient kubernetes.Interface) Option
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
Pod is the object to encapsulate docker
func (*Pod) GetNamespacedPodsStatus ¶
func (*Pod) ListAllNamespace ¶
func (*Pod) ListNamespacePods ¶
func (*Pod) UnreadyPodReason ¶
func (p *Pod) UnreadyPodReason(pod *corev1.Pod) (UnreadyReason, string)
type PodStatus ¶
type PodStatus struct { Reason UnreadyReason Message string }
type UnreadyReason ¶
type UnreadyReason string
const ( None UnreadyReason = "None" ImagePullFailed UnreadyReason = "ImagePullFailed" InsufficientResources UnreadyReason = "InsufficientResources" Unschedulable UnreadyReason = "Unschedulable" ProbeFailed UnreadyReason = "ProbeFailed" ContainerCannotRun UnreadyReason = "ContainerCannotRun" )
Click to show internal directories.
Click to hide internal directories.