registry

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package registry implements the REST storage that answers a create by calling a provider webhook. Nothing is persisted.

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 serves one ephemeral resource by delegating create to a webhook.

func New

func New(
	gvr schema.GroupVersionResource,
	gvk schema.GroupVersionKind,
	singularName string,
	namespaceScoped bool,
	tableConvertor rest.TableConvertor,
	validator apiservervalidation.SchemaValidator,
	client *webhook.Client,
) *REST

New builds a REST storage for one resource.

func (*REST) ConvertToTable

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

func (*REST) Create

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

Create answers the request from the webhook. The returned object is written to the client as the 201 body and is never persisted.

func (*REST) Destroy

func (r *REST) Destroy()

func (*REST) GetResetFields

func (r *REST) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set

GetResetFields is required by the framework's CreateServingInfoFor, which refuses to build a serving info for a storage without it. Nothing is stored, so no field is ever reset.

func (*REST) GetSingularName

func (r *REST) GetSingularName() string

func (*REST) NamespaceScoped

func (r *REST) NamespaceScoped() bool

func (*REST) New

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

Jump to

Keyboard shortcuts

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