pod

package
v0.0.0-...-ac8ee45 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2014 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package pod provides Registry interface and it's RESTStorage implementation for storing Pod api objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type REST

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

REST implements the RESTStorage interface in terms of a PodRegistry.

func NewREST

func NewREST(config *RESTConfig) *REST

NewREST returns a new REST.

func (*REST) Create

func (rs *REST) Create(obj runtime.Object) (<-chan runtime.Object, error)

func (*REST) Delete

func (rs *REST) Delete(id string) (<-chan runtime.Object, error)

func (*REST) Get

func (rs *REST) Get(id string) (runtime.Object, error)

func (*REST) List

func (rs *REST) List(selector labels.Selector) (runtime.Object, error)

func (*REST) New

func (*REST) New() runtime.Object

func (*REST) Update

func (rs *REST) Update(obj runtime.Object) (<-chan runtime.Object, error)

func (*REST) Watch

func (rs *REST) Watch(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error)

Watch begins watching for new, changed, or deleted pods.

type RESTConfig

type RESTConfig struct {
	CloudProvider cloudprovider.Interface
	PodCache      client.PodInfoGetter
	PodInfoGetter client.PodInfoGetter
	Registry      Registry
}

type Registry

type Registry interface {
	// ListPods obtains a list of pods that match selector.
	ListPods(selector labels.Selector) (*api.PodList, error)
	// Watch for new/changed/deleted pods
	WatchPods(resourceVersion uint64, filter func(*api.Pod) bool) (watch.Interface, error)
	// Get a specific pod
	GetPod(podID string) (*api.Pod, error)
	// Create a pod based on a specification.
	CreatePod(pod *api.Pod) error
	// Update an existing pod
	UpdatePod(pod *api.Pod) error
	// Delete an existing pod
	DeletePod(podID string) error
}

Registry is an interface implemented by things that know how to store Pod objects.

Jump to

Keyboard shortcuts

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