controller

package
v0.0.0-...-e20f597 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistryStorage

func NewRegistryStorage(registry Registry, podRegistry pod.Registry) apiserver.RESTStorage

NewRegistryStorage returns a new apiserver.RESTStorage for the given registry and podRegistry.

Types

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.

type RegistryStorage

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

RegistryStorage stores data for the replication controller service. It implements apiserver.RESTStorage.

func (*RegistryStorage) Create

func (rs *RegistryStorage) Create(obj interface{}) (<-chan interface{}, error)

Create registers the given ReplicationController.

func (*RegistryStorage) Delete

func (rs *RegistryStorage) Delete(id string) (<-chan interface{}, error)

Delete asynchronously deletes the ReplicationController specified by its id.

func (*RegistryStorage) Get

func (rs *RegistryStorage) Get(id string) (interface{}, error)

Get obtains the ReplicationController specified by its id.

func (*RegistryStorage) List

func (rs *RegistryStorage) List(selector labels.Selector) (interface{}, error)

List obtains a list of ReplicationControllers that match selector.

func (RegistryStorage) New

func (rs RegistryStorage) New() interface{}

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

func (*RegistryStorage) Update

func (rs *RegistryStorage) Update(obj interface{}) (<-chan interface{}, error)

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

func (*RegistryStorage) Watch

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

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

Jump to

Keyboard shortcuts

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