storage

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterStorage

type ClusterStorage struct {
	Cluster *REST
	Status  *StatusREST
	Proxy   *ProxyREST
}

ClusterStorage includes storage for Cluster and for all the subresources.

func NewStorage

func NewStorage(scheme *runtime.Scheme, restConfig *restclient.Config, secretLister listcorev1.SecretLister, optsGetter generic.RESTOptionsGetter) (*ClusterStorage, error)

NewStorage returns a ClusterStorage object that will work against clusters.

type ProxyREST

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

ProxyREST implements the proxy subresource for a Cluster.

func (*ProxyREST) Connect

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

Connect returns a handler for the cluster proxy.

func (*ProxyREST) ConnectMethods

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

ConnectMethods returns the list of HTTP methods handled by Connect.

func (*ProxyREST) Destroy added in v1.4.0

func (r *ProxyREST) Destroy()

Destroy cleans up its resources on shutdown.

func (*ProxyREST) New

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

New returns an empty cluster proxy subresource.

func (*ProxyREST) NewConnectOptions

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

NewConnectOptions returns versioned resource that represents proxy parameters.

type REST

type REST struct {
	*genericregistry.Store
	// contains filtered or unexported fields
}

REST implements a RESTStorage for Cluster.

func (*REST) ResourceLocation

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

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

type ResourceGetter

type ResourceGetter interface {
	Get(context.Context, string, *metav1.GetOptions) (runtime.Object, error)
}

ResourceGetter is an interface for retrieving resources by ResourceLocation.

type StatusREST

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

StatusREST implements the REST endpoint for changing the status of a cluster.

func (*StatusREST) Destroy added in v1.4.0

func (r *StatusREST) Destroy()

Destroy cleans up its resources on shutdown.

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

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

GetResetFields implements rest.ResetFieldsStrategy

func (*StatusREST) New

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

New returns empty Cluster object.

func (*StatusREST) Update

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

Update alters the status subset of an object.

Jump to

Keyboard shortcuts

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