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 ¶
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