pod

package
v0.0.8-prerelease Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogs

func GetLogs(writer io.Writer, streamer Streamer) error

GetLogs will follow the logs of the provided pod to the given io.Writer until the pod has been terminated or has completed.

func WaitForPhase

func WaitForPhase(c client.Client, namespacedName types.NamespacedName, interval, timeout time.Duration, podPhase corev1.PodPhase) (corev1.Pod, error)

WaitForPhase waits for a pdo with the given namespacedName to exist, checking every interval with and using the provided timeout. The pod itself is returned and any error that occurred.

Types

type Poller

type Poller interface {
	Poll(interval, timeout time.Duration, condition wait.ConditionFunc) error
}

type Streamer

type Streamer interface {
	Stream() (io.ReadCloser, error)
}

func CoreV1FollowStreamer

func CoreV1FollowStreamer(pod corev1.Pod, corev1Interface typedCorev1.CoreV1Interface) Streamer

CoreV1FollowStreamer returns a Streamer that will stream the logs to the given pod

Jump to

Keyboard shortcuts

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