Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CheckAllPodsReady() (bool, error)
- func (c *Client) CreateNamespace(name string) error
- func (c *Client) DeleteNamespace(name string) error
- func (c *Client) GetNotReadyPodEvent() (map[string][]EventPod, error)
- func (c *Client) GetPodEvents(namespace, podName string) ([]v1.Event, error)
- func (c *Client) GetPodLog(namespace, podName string) (string, error)
- func (c *Client) ListAllNamespacesPods() ([]*NamespacePod, error)
- func (c *Client) OutputNotReadyPodInfo() error
- func (c *Client) WaitAllPodRunning() error
- type EventPod
- type NamespacePod
Constants ¶
View Source
const ( // ReadyStatus is the ready status of a pod. ReadyStatus = "Ready" // TRUE is a string for true. TRUE = "True" // FALSE is a string for false. FALSE = "False" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // ClientSet is a kubernetes clientset. ClientSet *kubernetes.Clientset // DynamicClient is a dynamic client. DynamicClient *dynamic.DynamicClient }
Client is a kubernetes client.
func NewK8sClient ¶
NewK8sClient creates a new kubernetes client.
func (*Client) CheckAllPodsReady ¶
CheckAllPodsReady checks if all pods are ready.
func (*Client) CreateNamespace ¶
CreateNamespace creates a namespace.
func (*Client) DeleteNamespace ¶
DeleteNamespace deletes a namespace.
func (*Client) GetNotReadyPodEvent ¶
GetNotReadyPodEvent returns the events of not ready pods.
func (*Client) GetPodEvents ¶
GetPodEvents returns the events of a pod.
func (*Client) ListAllNamespacesPods ¶
func (c *Client) ListAllNamespacesPods() ([]*NamespacePod, error)
ListAllNamespacesPods returns a list of all namespaces and pods.
func (*Client) OutputNotReadyPodInfo ¶
OutputNotReadyPodInfo outputs the events of not ready pods.
func (*Client) WaitAllPodRunning ¶
WaitAllPodRunning waits for all pods to be ready
type EventPod ¶
type EventPod struct { // Reason is the reason this event was generated. Reason string // Message is a human-readable description of the status of this operation. Message string // Count is the number of times this event has occurred. Count int32 // Type of this event Type string // Action is what action was taken/failed regarding to the Regarding object. Action string // Namespace is the namespace this event applies to. Namespace string }
EventPod contains events of a pod.
Click to show internal directories.
Click to hide internal directories.