image

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewREST

func NewREST(registry Registry) apiserver.RESTStorage

NewREST returns a new REST.

Types

type REST

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

REST implements the RESTStorage interface in terms of an Registry.

func (*REST) Create

func (s *REST) Create(ctx kapi.Context, obj runtime.Object) (<-chan apiserver.RESTResult, error)

Create registers the given Image.

func (*REST) Delete

func (s *REST) Delete(ctx kapi.Context, id string) (<-chan apiserver.RESTResult, error)

Delete asynchronously deletes an Image specified by its id.

func (*REST) Get

func (s *REST) Get(ctx kapi.Context, id string) (runtime.Object, error)

Get retrieves an Image by id.

func (*REST) List

func (s *REST) List(ctx kapi.Context, selector, fields labels.Selector) (runtime.Object, error)

List retrieves a list of Images that match selector.

func (*REST) New

func (s *REST) New() runtime.Object

New returns a new Image for use with Create and Update.

func (*REST) NewList added in v0.2.1

func (*REST) NewList() runtime.Object

func (*REST) Watch

func (s *REST) Watch(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)

Watch begins watching for new or deleted Images.

type Registry

type Registry interface {
	// ListImages obtains a list of images that match a selector.
	ListImages(ctx kapi.Context, selector labels.Selector) (*api.ImageList, error)
	// GetImage retrieves a specific image.
	GetImage(ctx kapi.Context, id string) (*api.Image, error)
	// CreateImage creates a new image.
	CreateImage(ctx kapi.Context, image *api.Image) error
	// UpdateImage updates an image.
	UpdateImage(ctx kapi.Context, image *api.Image) error
	// DeleteImage deletes an image.
	DeleteImage(ctx kapi.Context, id string) error
	// WatchImages watches for new or deleted images.
	WatchImages(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}

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

Jump to

Keyboard shortcuts

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