kubernetes: github.com/CyrusBiotechnology/kubernetes/contrib/mesos/pkg/podutil Index | Files

package podutil

import "github.com/CyrusBiotechnology/kubernetes/contrib/mesos/pkg/podutil"

podutil contains utilities for reading, writing and filtering streams and lists of api.Pod objects.


Package Files

doc.go filters.go gzip.go io.go

func Annotate Uses

func Annotate(meta *api.ObjectMeta, kv map[string]string)

Annotate safely copies annotation metadata from kv to meta.Annotations.

func Gunzip Uses

func Gunzip(gzipped []byte) <-chan *api.Pod

func Gzip Uses

func Gzip(pods <-chan *api.Pod) ([]byte, error)

func List Uses

func List(pods <-chan *api.Pod) *api.PodList

List reads every pod from the pods chan and returns them all in an api.PodList

func ReadFromDir Uses

func ReadFromDir(dirpath string) (<-chan *api.Pod, <-chan error)

func Stream Uses

func Stream(list *api.PodList, err error) <-chan *api.Pod

Stream returns a chan of pods that yields each pod from the given list. No pods are yielded if err is non-nil.

func WriteToDir Uses

func WriteToDir(pods <-chan *api.Pod, destDir string) error

type FilterFunc Uses

type FilterFunc func(pod *api.Pod) (bool, error)

return true if the pod passes the filter

func Annotator Uses

func Annotator(m map[string]string) FilterFunc

Annotator returns a filter that copies annotations from map m into a pod

func Environment Uses

func Environment(env []api.EnvVar) FilterFunc

Environment returns a filter that writes environment variables into pod containers

func (FilterFunc) Do Uses

func (filter FilterFunc) Do(in <-chan *api.Pod) <-chan *api.Pod

type Filters Uses

type Filters []FilterFunc

func (Filters) Do Uses

func (filters Filters) Do(in <-chan *api.Pod) (out <-chan *api.Pod)

Package podutil imports 14 packages (graph). Updated 2017-07-25. Refresh now. Tools for package owners. This is a quick bug-fix fork (has fewer than three commits, and only during the week it was created).