Documentation ¶
Overview ¶
Package pod manipulates the k8s api of pod object
Index ¶
- type Option
- type Pod
- func (p *Pod) Delete(namespace, podname string) error
- func (p *Pod) Get(namespace, name string) (*apiv1.Pod, error)
- func (p *Pod) GetNamespacedPodsStatus(pods []apiv1.Pod, serviceName string) ([]PodStatus, error)
- func (p *Pod) LimitedListAllNamespace(limit int, cont *string) (*apiv1.PodList, *string, error)
- func (p *Pod) ListAllNamespace(fieldSelectors []string) (*apiv1.PodList, error)
- func (p *Pod) ListNamespacePods(namespace string) (*apiv1.PodList, error)
- func (p *Pod) UnreadyPodReason(pod *apiv1.Pod) (UnreadyReason, string)
- func (p *Pod) WatchAllNamespace(ctx context.Context, addfunc, updatefunc, deletefunc func(*apiv1.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 an Pod
func WithCompleteParams ¶
func WithCompleteParams(addr string, client *httpclient.HTTPClient) Option
WithCompleteParams provides an Option
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
Pod is the object to encapsulate docker
func (*Pod) GetNamespacedPodsStatus ¶
func (*Pod) LimitedListAllNamespace ¶
func (*Pod) ListAllNamespace ¶
func (*Pod) ListNamespacePods ¶
func (*Pod) UnreadyPodReason ¶
func (p *Pod) UnreadyPodReason(pod *apiv1.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.