cmd

package
v0.0.0-...-d27905d Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type ContainerLogsWatcher

type ContainerLogsWatcher struct {
	// contains filtered or unexported fields
}

ContainerLogsWatcheri is a watcher to monitor and control all container log streams

func NewContainerLogsWatcher

func NewContainerLogsWatcher(client *kubernetes.Clientset, config WatcherConfig) *ContainerLogsWatcher

NewContainerLogsWatcher returns a new watcher

func (*ContainerLogsWatcher) AddPod

func (w *ContainerLogsWatcher) AddPod(ctx context.Context, pod corev1.Pod)

AddPod will start a log stream for each of the pods containers

func (*ContainerLogsWatcher) DoneChan

func (w *ContainerLogsWatcher) DoneChan() chan struct{}

DoneChan returns a channel that indicates whether the all the container log streams have finished

func (*ContainerLogsWatcher) ForceFinish

func (w *ContainerLogsWatcher) ForceFinish()

ForceFinish will force close the finished chan if there is something blocking for any reason

func (*ContainerLogsWatcher) Start

func (w *ContainerLogsWatcher) Start(ctx context.Context)

Start will get the selected pods and watch their containers log streams

type WatcherConfig

type WatcherConfig struct {
	// contains filtered or unexported fields
}

WatcherConfig holds information about a pod selections

Jump to

Keyboard shortcuts

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