pod

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreAllPodsRunning

func AreAllPodsRunning(podPrefix, namespace string) (bool, error)

AreAllPodsRunning will return true if all pods are in a Running State

func WaitOnReady

func WaitOnReady(podPrefix, namespace string, sleep, duration time.Duration) (bool, error)

WaitOnReady will block until all nodes are in ready state

Types

type List

type List struct {
	Pods []Pod `json:"items"`
}

List is a container that holds all pods returned from doing a kubectl get pods

func GetAll

func GetAll(namespace string) (*List, error)

GetAll will return all pods in a given namespace

type Metadata

type Metadata struct {
	CreatedAt time.Time         `json:"creationTimestamp"`
	Labels    map[string]string `json:"labels"`
	Name      string            `json:"name"`
	Namespace string            `json:"namespace"`
}

Metadata holds information like name, createdat, labels, and namespace

type Pod

type Pod struct {
	Metadata Metadata `json:"metadata"`
	Status   Status   `json:"status"`
}

Pod is used to parse data from kubectl get pods

func Get

func Get(podName, namespace string) (*Pod, error)

Get will return a pod with a given name and namespace

type Status

type Status struct {
	HostIP    string    `json:"hostIP"`
	Phase     string    `json:"phase"`
	PodIP     string    `json:"podIP"`
	StartTime time.Time `json:"startTime"`
}

Status holds information like hostIP and phase

Jump to

Keyboard shortcuts

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