Help us shape the future of Go! Take the 2026 Go Developer Survey

podsource

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// if we don't use this source then the kubelet will do funny, mirror things. we alias
	// this here for convenience. see the docs for Source for additional explanation.
	// @see ConfigSourceAnnotationKey
	MesosSource = kubetypes.ApiserverSource
)

Variables

This section is empty.

Functions

func Mesos

func Mesos(
	stop <-chan struct{},
	out chan<- interface{},
	podWatch *cache.ListWatch,
	registry executor.Registry,
	options ...Option,
)

Mesos spawns a new pod source that watches API server for changes and collaborates with executor.Registry to generate api.Pod objects in a fashion that's very Mesos-aware.

Types

type Filter

type Filter interface {
	// Before is invoked before any pods are evaluated
	Before(podCount int)
	// Accept returns true if this pod should be accepted by the source; a value
	// of false results in the pod appearing to have been removed from apiserver.
	// If true, the caller should use the output pod value for the remainder of
	// the processing task. If false then the output pod value may be nil.
	Accept(*api.Pod) (*api.Pod, bool)
	// After is invoked after all pods have been evaluated
	After()
}

Filter is invoked for each snapshot of pod state that passes through this source

type FilterFunc

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

FilterFunc is a simplified Filter implementation that only implements Filter.Accept, its Before and After implementations are noop.

func (FilterFunc) Accept

func (f FilterFunc) Accept(pod *api.Pod) (*api.Pod, bool)

func (FilterFunc) After

func (f FilterFunc) After()

func (FilterFunc) Before

func (f FilterFunc) Before(_ int)

type Option

type Option func(*Source)

func ContainerEnvOverlay

func ContainerEnvOverlay(env []api.EnvVar) Option

type Source

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

Jump to

Keyboard shortcuts

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