route

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

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 is an implementation of RESTStorage for the api server.

func NewREST

func NewREST(registry Registry) *REST

func (*REST) Create

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

Create registers a given new Route instance to rs.registry.

func (*REST) Delete

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

Delete asynchronously deletes the Route specified by its id.

func (*REST) Get

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

Get obtains the route specified by its id.

func (*REST) List

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

List obtains a list of Routes that match selector.

func (*REST) New

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

func (*REST) NewList added in v0.2.1

func (*REST) NewList() runtime.Object

func (*REST) Update

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

Update replaces a given Route instance with an existing instance in rs.registry.

func (*REST) Watch

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

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

type Registry

type Registry interface {
	// ListRoutes obtains list of routes that match a selector.
	ListRoutes(ctx kapi.Context, selector labels.Selector) (*api.RouteList, error)
	// GetRoute retrieves a specific route.
	GetRoute(ctx kapi.Context, routeID string) (*api.Route, error)
	// CreateRoute creates a new route.
	CreateRoute(ctx kapi.Context, route *api.Route) error
	// UpdateRoute updates a route.
	UpdateRoute(ctx kapi.Context, route *api.Route) error
	// DeleteRoute deletes a route.
	DeleteRoute(ctx kapi.Context, routeID string) error
	// WatchRoutes watches for new/modified/deleted routes.
	WatchRoutes(ctx kapi.Context, labels, fields labels.Selector, resourceVersion string) (watch.Interface, error)
}

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

Jump to

Keyboard shortcuts

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