pod

package
v0.0.0-...-313cd9e Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stream

func Stream(streamer LogStreamer, podName string, opts *api.PodLogOptions) (<-chan string, <-chan error)

Stream streams logs for the given pod from the given streamer, according to the given opts.

The stream will start in a goroutine and the returned channel will receive all logs until they stop. If there was an error starting the stream, the returned channel will be closed and a non-nil error will be returned.

Types

type FakeLister

type FakeLister struct {
	PodList *api.PodList
	Err     error
}

FakeLister is a Lister implementation designed to be used in unit tests

func (FakeLister) List

func (f FakeLister) List(api.ListOptions) (*api.PodList, error)

List is the Lister interface implementation. It simply returns f.PodList, f.Err

type Lister

type Lister interface {
	List(api.ListOptions) (*api.PodList, error)
}

Lister is a (k8s.io/kubernetes/pkg/client/unversioned).PodInterface compatible interface designed only for listing pods. It should be used as a parameter to functions so that they can be more easily unit tested

type LogStreamer

type LogStreamer interface {
	// GetLogs gets the logs for the given pod name, according to the given options
	GetLogs(podName string, opts *api.PodLogOptions) *api.Request
}

LogStreamer is just the GetLogs func from github.com/jchauncey/kubeclient/api.PodInterface

Jump to

Keyboard shortcuts

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