route

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const HostGeneratedAnnotationKey = "openshift.io/host.generated"

HostGeneratedAnnotationKey is the key for an annotation set to "true" if the route's host was generated

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, allocator route.RouteAllocator) *REST

NewREST returns a RESTStorage object that will work against routes.

func (*REST) Create

func (rs *REST) Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error)

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

func (*REST) Delete

func (rs *REST) Delete(ctx kapi.Context, id string) (runtime.Object, 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, label labels.Selector, field fields.Selector) (runtime.Object, error)

List obtains a list of Routes that match label.

func (*REST) New

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

New returns a new Route

func (*REST) NewList

func (*REST) NewList() runtime.Object

NewList returns a new list of Routes

func (*REST) Update

func (rs *REST) Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, 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 labels.Selector, field fields.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, label labels.Selector, field fields.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