service

package
v0.0.0-...-3abba25 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package service provides the Registry interface and its RESTStorage implementation for storing Service api objects.

Index

Constants

This section is empty.

Variables

View Source
var StatusStrategy = serviceStatusStrategy{Strategy}

StatusStrategy is the default logic invoked when updating service status.

Services is the default logic that applies when creating and updating Service objects.

Functions

This section is empty.

Types

type ProxyREST

type ProxyREST struct {
	Redirector     rest.Redirector
	ProxyTransport http.RoundTripper
}

ProxyREST implements the proxy subresource for a Service

func (*ProxyREST) Connect

func (r *ProxyREST) Connect(ctx context.Context, id string, opts runtime.Object, responder rest.Responder) (http.Handler, error)

Connect returns a handler for the service proxy

func (*ProxyREST) ConnectMethods

func (r *ProxyREST) ConnectMethods() []string

ConnectMethods returns the list of HTTP methods that can be proxied

func (*ProxyREST) New

func (r *ProxyREST) New() runtime.Object

New returns an empty service resource

func (*ProxyREST) NewConnectOptions

func (r *ProxyREST) NewConnectOptions() (runtime.Object, bool, string)

NewConnectOptions returns versioned resource that represents proxy parameters

type Registry

type Registry interface {
	ListServices(ctx context.Context, options *metainternalversion.ListOptions) (*api.ServiceList, error)
	CreateService(ctx context.Context, svc *api.Service, createValidation rest.ValidateObjectFunc) (*api.Service, error)
	GetService(ctx context.Context, name string, options *metav1.GetOptions) (*api.Service, error)
	DeleteService(ctx context.Context, name string) error
	UpdateService(ctx context.Context, svc *api.Service, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) (*api.Service, error)
	WatchServices(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
	ExportService(ctx context.Context, name string, options metav1.ExportOptions) (*api.Service, error)
}

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

func NewRegistry

func NewRegistry(s rest.StandardStorage) Registry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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