Documentation ¶
Index ¶
- func NewGenericREST(optsGetter generic.RESTOptionsGetter, serviceCIDR net.IPNet, hasSecondary bool) (*GenericREST, *StatusREST, error)
- type EndpointsStorage
- type GenericREST
- type REST
- func (rs *REST) Categories() []string
- func (r *REST) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)
- func (rs *REST) Create(ctx context.Context, obj runtime.Object, ...) (runtime.Object, error)
- func (rs *REST) Delete(ctx context.Context, id string, deleteValidation rest.ValidateObjectFunc, ...) (runtime.Object, bool, error)
- func (rs *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
- func (rs *REST) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set
- func (rs *REST) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
- func (rs *REST) NamespaceScoped() bool
- func (rs *REST) New() runtime.Object
- func (rs *REST) NewList() runtime.Object
- func (rs *REST) ResourceLocation(ctx context.Context, id string) (*url.URL, http.RoundTripper, error)
- func (rs *REST) ShortNames() []string
- func (rs *REST) StorageVersion() runtime.GroupVersioner
- func (rs *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, ...) (runtime.Object, bool, error)
- func (rs *REST) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
- type ServiceNodePort
- type ServiceStorage
- type StatusREST
- func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
- func (r *StatusREST) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set
- func (r *StatusREST) New() runtime.Object
- func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, ...) (runtime.Object, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGenericREST ¶ added in v1.10.0
func NewGenericREST(optsGetter generic.RESTOptionsGetter, serviceCIDR net.IPNet, hasSecondary bool) (*GenericREST, *StatusREST, error)
NewREST returns a RESTStorage object that will work against services.
Types ¶
type EndpointsStorage ¶ added in v1.10.0
type EndpointsStorage interface { rest.Getter rest.GracefulDeleter }
type GenericREST ¶ added in v1.10.0
type GenericREST struct { *genericregistry.Store // contains filtered or unexported fields }
func (*GenericREST) Categories ¶ added in v1.10.0
func (r *GenericREST) Categories() []string
Categories implements the CategoriesProvider interface. Returns a list of categories a resource is part of.
func (*GenericREST) ShortNames ¶ added in v1.10.0
func (r *GenericREST) ShortNames() []string
ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource.
type REST ¶
type REST struct {
// contains filtered or unexported fields
}
REST adapts a service registry into apiserver's RESTStorage model.
func NewREST ¶
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 ¶ added in v1.7.0
Categories implements the CategoriesProvider interface. Returns a list of categories a resource is part of.
func (*REST) ConvertToTable ¶ added in v1.10.0
func (*REST) GetResetFields ¶ added in v1.21.0
func (rs *REST) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set
GetResetFields implements rest.ResetFieldsStrategy
func (*REST) List ¶ added in v1.10.0
func (rs *REST) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error)
func (*REST) NamespaceScoped ¶ added in v1.11.0
func (*REST) ResourceLocation ¶ added in v1.10.0
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 ¶
ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource.
func (*REST) StorageVersion ¶ added in v1.14.0
func (rs *REST) StorageVersion() runtime.GroupVersioner
func (*REST) Update ¶ added in v1.10.0
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 ¶ added in v1.10.0
func (rs *REST) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error)
type ServiceNodePort ¶ added in v1.10.0
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 ¶ added in v1.10.0
type ServiceStorage interface { rest.Scoper rest.Getter rest.Lister rest.CreaterUpdater rest.GracefulDeleter rest.Watcher rest.StorageVersionProvider rest.ResetFieldsStrategy }
type StatusREST ¶
type StatusREST struct {
// contains filtered or unexported fields
}
StatusREST implements the GenericREST endpoint for changing the status of a service.
func (*StatusREST) Get ¶
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) GetResetFields ¶ added in v1.21.0
func (r *StatusREST) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set
GetResetFields implements rest.ResetFieldsStrategy
func (*StatusREST) New ¶
func (r *StatusREST) New() runtime.Object
func (*StatusREST) Update ¶
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.