cluster

package
v0.4.2-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StatusStartegy = clusterStatusStrategy{Strategy}
View Source
var Strategy = clusterStrategy{scheme.Scheme, names.SimpleNameGenerator}

Functions

func GetAttrs

func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error)

GetAttrs returns labels.Set, fields.Set, and error in case the given runtime.Object is not a Fischer

func MatchCluster

func MatchCluster(label labels.Selector, field fields.Selector) storage.SelectionPredicate

MatchCluster is the filter used by the generic etcd backend to watch events from etcd to clients of the apiserver only interested in specific labels/fields.

func NewConfigFromCluster

func NewConfigFromCluster(c *cluster.Cluster) (*restclient.Config, error)

func SelectableFields

func SelectableFields(obj *cluster.Cluster) fields.Set

SelectableFields returns a field set that represents the object.

Types

type ProxyREST

type ProxyREST struct {
	Store *genericregistry.Store
}

func (*ProxyREST) Connect

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

func (*ProxyREST) ConnectMethods

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

func (*ProxyREST) Destroy

func (r *ProxyREST) Destroy()

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)

type REST

type REST struct {
	*genericregistry.Store
}

func (*REST) ShortNames

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

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

type RESTStorageProvider

type RESTStorageProvider struct{}

func (RESTStorageProvider) GroupName

func (p RESTStorageProvider) GroupName() string

func (RESTStorageProvider) NewRESTStorage

func (p RESTStorageProvider) NewRESTStorage(
	apiResourceConfigSource serverstorage.APIResourceConfigSource,
	restOptionsGetter generic.RESTOptionsGetter,
) (genericapiserver.APIGroupInfo, error)

type StatusREST

type StatusREST struct {
	Store *genericregistry.Store
}

func (*StatusREST) ConvertToTable

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

func (*StatusREST) Destroy

func (r *StatusREST) Destroy()

Destroy cleans up 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,
	forceAllowCreate bool,
	options *metav1.UpdateOptions,
) (runtime.Object, bool, error)

Update alters the status subset of an object.

type Storage

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

func NewREST

func NewREST(optsGetter generic.RESTOptionsGetter) (*Storage, error)

NewREST returns a RESTStorage object that will work against API services.

Jump to

Keyboard shortcuts

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