proxy

package
v1.9.0-industry.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig added in v1.8.0

func GetConfig(ctx context.Context, platformClient platforminternalclient.PlatformInterface) (*rest.Config, error)

func RESTClient

RESTClient returns the versioned rest client of clientSet.

func RESTClientFor

func RESTClientFor(clientSet *kubernetes.Clientset, apiGroup, apiVersion string) restclient.Interface

RESTClientFor returns the versioned rest client of clientSet by given api version.

Types

type Store

type Store struct {
	// NewFunc returns a new instance of the type this registry returns for a
	// GET of a single object
	NewFunc func() runtime.Object
	// NewListFunc returns a new list of the type this registry
	NewListFunc func() runtime.Object
	// DefaultQualifiedResource is the pluralized name of the resource.
	// This field is used if there is no request info present in the context.
	// See qualifiedResourceFromContext for details.
	DefaultQualifiedResource schema.GroupResource
	// TableConvertor is an optional interface for transforming items or lists
	// of items into tabular output. If unset, the default will be used.
	TableConvertor rest.TableConvertor

	Namespaced     bool
	PlatformClient platforminternalclient.PlatformInterface
}

Store implements pkg/api/rest.StandardStorage.

func (*Store) ConvertToTable

func (s *Store) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*v1.Table, error)

ConvertToTable converts objects to metav1.Table objects using default table convertor.

func (*Store) Create

func (s *Store) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *v1.CreateOptions) (runtime.Object, error)

Create inserts a new item according to the unique key from the object.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *v1.DeleteOptions) (runtime.Object, bool, error)

Delete finds a resource in the storage and deletes it.

func (*Store) DeleteCollection

func (s *Store) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error)

DeleteCollection selects all resources in the storage matching given 'listOptions' and deletes them. If 'options' are provided, the resource will attempt to honor them or return an invalid request error. DeleteCollection may not be atomic - i.e. it may delete some objects and still return an error after it. On success, returns a list of deleted objects.

func (*Store) Get

func (s *Store) Get(ctx context.Context, name string, options *v1.GetOptions) (runtime.Object, error)

Get retrieves the item from storage.

func (*Store) List

List returns a list of items matching labels and field according to the backend kubernetes api server.

func (*Store) NamespaceScoped

func (s *Store) NamespaceScoped() bool

NamespaceScoped indicates whether the resource is namespaced.

func (*Store) New

func (s *Store) New() runtime.Object

New implements RESTStorage.New.

func (*Store) NewList

func (s *Store) NewList() runtime.Object

NewList implements rest.Lister.

func (*Store) Update

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

Update finds a resource in the storage and updates it. Some implementations may allow updates creates the object - they should set the created boolean to true.

func (*Store) Watch

Watch makes a matcher for the given label and field, and calls WatchPredicate. If possible, you should customize PredicateFunc to produce a matcher that matches by key. SelectionPredicate does this for you automatically.

Jump to

Keyboard shortcuts

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