kubernetes: k8s.io/kubernetes/pkg/registry/core/service/storage Index | Files

package storage

import "k8s.io/kubernetes/pkg/registry/core/service/storage"

Index

Package Files

rest.go storage.go

func NewGenericREST Uses

func NewGenericREST(optsGetter generic.RESTOptionsGetter) (*GenericREST, *StatusREST, error)

NewREST returns a RESTStorage object that will work against services.

type EndpointsStorage Uses

type EndpointsStorage interface {
    rest.Getter
    rest.GracefulDeleter
}

type GenericREST Uses

type GenericREST struct {
    *genericregistry.Store
}

func (*GenericREST) Categories Uses

func (r *GenericREST) Categories() []string

Categories implements the CategoriesProvider interface. Returns a list of categories a resource is part of.

func (*GenericREST) ShortNames Uses

func (r *GenericREST) ShortNames() []string

ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource.

type REST Uses

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

REST adapts a service registry into apiserver's RESTStorage model.

func NewREST Uses

func NewREST(
    services ServiceStorage,
    endpoints EndpointsStorage,
    pods rest.Getter,
    serviceIPs ipallocator.Interface,
    secondaryServiceIPs ipallocator.Interface,
    serviceNodePorts portallocator.Interface,
    proxyTransport http.RoundTripper,
) (*REST, *registry.ProxyREST)

NewREST returns a wrapper around the underlying generic storage and performs allocations and deallocations of various service related resources like ports. TODO: all transactional behavior should be supported from within generic storage

or the strategy.

func (*REST) Categories Uses

func (rs *REST) Categories() []string

Categories implements the CategoriesProvider interface. Returns a list of categories a resource is part of.

func (*REST) ConvertToTable Uses

func (r *REST) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error)

func (*REST) Create Uses

func (rs *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

func (*REST) Delete Uses

func (rs *REST) Delete(ctx context.Context, id string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error)

func (*REST) Export Uses

func (rs *REST) Export(ctx context.Context, name string, opts metav1.ExportOptions) (runtime.Object, error)

func (*REST) Get Uses

func (rs *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

func (*REST) List Uses

func (rs *REST) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)

func (*REST) NamespaceScoped Uses

func (rs *REST) NamespaceScoped() bool

func (*REST) New Uses

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

func (*REST) NewList Uses

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

func (*REST) ResourceLocation Uses

func (rs *REST) ResourceLocation(ctx context.Context, id string) (*url.URL, http.RoundTripper, error)

ResourceLocation returns a URL to which one can send traffic for the specified service.

func (*REST) ShortNames Uses

func (rs *REST) ShortNames() []string

ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource.

func (*REST) StorageVersion Uses

func (rs *REST) StorageVersion() runtime.GroupVersioner

func (*REST) Update Uses

func (rs *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)

func (*REST) Watch Uses

func (rs *REST) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error)

type ServiceNodePort Uses

type ServiceNodePort struct {
    // The IP protocol for this port. Supports "TCP" and "UDP".
    Protocol api.Protocol

    // The port on each node on which this service is exposed.
    // Default is to auto-allocate a port if the ServiceType of this Service requires one.
    NodePort int32
}

ServiceNodePort includes protocol and port number of a service NodePort.

type ServiceStorage Uses

type ServiceStorage interface {
    rest.Scoper
    rest.Getter
    rest.Lister
    rest.CreaterUpdater
    rest.GracefulDeleter
    rest.Watcher
    rest.TableConvertor
    rest.Exporter
    rest.StorageVersionProvider
}

type StatusREST Uses

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

StatusREST implements the GenericREST endpoint for changing the status of a service.

func (*StatusREST) Get Uses

func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

Get retrieves the object from the storage. It is required to support Patch.

func (*StatusREST) New Uses

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

func (*StatusREST) Update Uses

func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)

Update alters the status subset of an object.

Package storage imports 35 packages (graph) and is imported by 7 packages. Updated 2019-09-23. Refresh now. Tools for package owners.