controller

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: 11 Imported by: 0

Documentation

Overview

Package controller provides Registry interface and it's RESTStorage implementation for storing ReplicationController api objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodLister

type PodLister interface {
	ListPods(labels.Selector) (*api.PodList, error)
}

PodLister is anything that knows how to list pods.

type REST

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

REST implements apiserver.RESTStorage for the replication controller service.

func NewREST

func NewREST(registry Registry, podLister PodLister) *REST

NewREST returns a new apiserver.RESTStorage for the given registry and PodLister.

func (*REST) Create

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

Create registers the given ReplicationController.

func (*REST) Delete

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

Delete asynchronously deletes the ReplicationController specified by its id.

func (*REST) Get

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

Get obtains the ReplicationController specified by its id.

func (*REST) List

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

List obtains a list of ReplicationControllers that match selector.

func (*REST) New

func (*REST) New() runtime.Object

New creates a new ReplicationController for use with Create and Update.

func (*REST) Update

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

Update replaces a given ReplicationController instance with an existing instance in storage.registry.

func (*REST) Watch

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

Watch returns ReplicationController events via a watch.Interface. It implements apiserver.ResourceWatcher.

type Registry

type Registry interface {
	ListControllers() (*api.ReplicationControllerList, error)
	WatchControllers(resourceVersion uint64) (watch.Interface, error)
	GetController(controllerID string) (*api.ReplicationController, error)
	CreateController(controller *api.ReplicationController) error
	UpdateController(controller *api.ReplicationController) error
	DeleteController(controllerID string) error
}

Registry is an interface for things that know how to store ReplicationControllers.

Jump to

Keyboard shortcuts

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